Jump to content

Deleting Files


Shawndt
 Share

Recommended Posts

should already be on the machine (unpacked in the include folder when autoit installed) just make sure to add that line to the top of your code if you use the _RunDOS function

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

Try it:

$sFileToDelete = @DesktopDir & '\DeleteReadOnlyFile.txt'

If StringInStr(FileGetAttrib($sFileToDelete), 'R') Then FileSetAttrib($sFileToDelete, '-R')
$iRet = FileDelete($sFileToDelete)

Danny, thanks so much for your help. Got another question. I am checking to see if a fileexist which is simply but i cannot find the Syntax to Check for Directory?

Link to comment
Share on other sites

you can use FileExists to check for files and folders

FileExists ( "path" )

Parameters

Path The directory or file to check.

Return Value

Success: Returns 1.

Failure: Returns 0 if path/file does not exist.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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