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
EndIf

Thanks in advance. 

 

Edited by SkysLastChance

Life's simple. You make choices and you don't look back.

Link to post
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...