DaLiMan Posted January 12, 2005 Posted January 12, 2005 Hi, I have this simple script which checks if a file in a directory is written. But I also like to know which file is last written / accesed. Is this possible? (Any idea is very welcome! ) Here's what I have: $DirSize = DirGetSize("S:\CQR\user") $DirSize2 = $DirSize While 1 $DirSize = DirGetSize("S:\CQR\user") If $DirSize <> $DirSize2 Then $MsgBox = Msgbox(4,"","CQR user!") $DirSize2 = $DirSize If $MsgBox = 6 Then $letter = "S:\CQR\User" Run("explorer.exe /e," & $letter , "" , @SW_MAXIMIZE ) EndIf Else $DirSize2 = $DirSize EndIf Sleep(1000*60) WEnd
trids Posted January 12, 2005 Posted January 12, 2005 Redirect the output of the DOS command dir /o-d /a-d /b to a file or clipboard, and read the first line:Orders the line in descending order of date.select files only (non-directories)filenames only (no size noise etc)
DaLiMan Posted January 12, 2005 Author Posted January 12, 2005 Redirect the output of the DOS command dir /o-d /a-d /b to a file or clipboard, and read the first line:Orders the line in descending order of date.select files only (non-directories) filenames only (no size noise etc)<{POST_SNAPBACK}>Thanx tris, I have just been testing and scripting and this is a nice feature. All works very nice. Thanx again.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now