Jump to content

_WinAPI_ReadDirectoryChanges() Exclude Tempoary files?

Recommended Posts

Hey fam,

Is there a diffrent/better way I should be using to exlude temp files other then. 

$aData = _WinAPI_ReadDirectoryChanges($hDirectory, $FILE_NOTIFY_CHANGE_FILE_NAME, $pBuffer, 65536, False)
$FileTempCheck = StringLeft($aData[1][0],2)

;Looks for the creation of a new file as long as it does not begin with ~$ will run.
If $FileNew = 1 And $FileTempCheck <> "~$"  Then
    ;My Script

Thanks in advance. 


Edited by SkysLastChance

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

  • SkysLastChance changed the title to _WinAPI_ReadDirectoryChanges() Exclude Tempoary files?

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...