Jump to content

Recommended Posts

Posted

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! :idiot: )

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
Posted

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)
Posted

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. :idiot::D

Thanx again.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...