FileSetDates

<< Click to Display Table of Contents >>

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

FileSetDates

available from build: 20070907

Description

This command allows the setting of the file dates with administrative priviledges, when needed.

Syntax

call DBWShell("FileSetDates fullPathFileName fileCreationDate fileLastModifiedDate fileLastAccessDate")

Parameters

fullPathFileName

the full path of the file

fileCreationDate

the file creation date/time;
0:no assignment is performed

fileLastModifiedDate

the file last modification date/time;
0:no assignment is performed

fileLastAccessDate

the file last access date/time;
0:no assignment is performed

Remarks

setting dates on a REMOTE file and DBWACLServer is active → YYYY-MM-DD HH:MM:SS UTC

setting dates on a LOCAL file and DBWACLServer is active → YYYYMMDD HH:MM:SS local time

setting dates on a file and DBWServer is active → YYYYMMDD HH:MM:SS local time

setting dates on a file and neither DBWACLServer nor DBWServer are active → YYYYMMDD HH:MM:SS local time

Example

DBWServer environment:

Sub Main()

 DBWinit(TRUE)
 'Assign only the Last Modified Date
 DBWShell( "FileSetDates " &_
               replace("Z:\MyArchive\MyFile.SLDPRT"," ","|") & " " &_
               "0" &_
               replace("20150802 13:30:00"," ","|") & " " &_
               "0" )
End Sub

DBWACLServer environment:

Sub Main()

 DBWinit(TRUE)
 'Assign only the Last Modified Date
 DBWShell( "FileSetDates " &_
               replace("Z:\MyArchive\MyFile.SLDPRT"," ","|") & " " &_
               "0" &_
               replace("2015-08-02 13:30:00"," ","|") & " " &_
               "0" )
End Sub