views:

45

answers:

1

Is there a touch() function available? I would like to update the timestamp so my script doesnt delete the file when it becomes X old. Another issue is it should work when the file is locked for reading by another process.

+1  A: 

You might want to look into the FileInfo class. You can set LastWriteTime, LastAccessTime etc from there.

If the file is locked, you may run into a problem, but it's amazing what you CAN do to a locked file.

Brad Bruce