FileGetSizeAndDates

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > File >

FileGetSizeAndDates

available from build: 20070905

Description

This command allows the reading of the file size and dates with administrative priviledges, when needed.

Syntax

call DBWShell("FileGetSizeAndDates fullPathFileName [useUTC]")

Parameters

fullPathFileName

the full path of the file

useUTC

Optional.
0: returns the date/time according to local pc format settings
1: returns the date/time in UTC format

Remarks

When not running under DBWServer, it gets the size and dates by using the standard Win32 functionalities.

Example

Sub Main()

 DBWinit(TRUE)
 DBWShell( "FileGetSizeAndDates " & replace("M:\MyArchive\MyFile.SLDDRW"," ","|"))
 fileSize = DBWResult("@FILE_SIZE")
 creationTime = DBWResult("@FILE_CREATION_TIME")
 lastModifiedTime = DBWResult("@FILE_LAST_MODIFIED_TIME")
 fileAccessTime = DBWResult("@FILE_ACCESS_TIME")
 DBWMsgBox _
  "size = " & fileSize & vbcrlf &_
  "creation time = " & creationTime & vbcrlf &_
  "last modified time = " & lastModifiedTime & vbcrlf &_
  "file access time = " & fileAccessTime
End Sub