Jump to content
Sign in to follow this  
inuyasha

delete file hidden

Recommended Posts

weaponx

I don't think hidden files delete any differently then other files.

FileDelete ( "path" )

Share this post


Link to post
Share on other sites
DjDeep00

@inuyasha...If you are looking to delete only the hidden files then do this...

1. Use FileFindFirstFile & FileFindNextFile functions...to get all the names of the files in a certain folder.

2. Use FileGetAttrib to get only the files that have the "hidden" attribute.

3. Like Weaponx stated...then use FileDelete to delete only the hidden files.

I dont know why you would do this but please ignore this if this is not what u wanted todo.

Share this post


Link to post
Share on other sites
Arm

you can make use of Dos comment through AutoIt for example "run(@COMSPEC & " /c del /A:R /A:H $Filenamewithpath)"


------------------------------------------------------"You are never a loser,until you quit trying"------------------------------------------------------

Share this post


Link to post
Share on other sites
saywell

you can make use of Dos comment through AutoIt for example "run(@COMSPEC & " /c del /A:R /A:H $Filenamewithpath)"

Or you can use the native AutoIt command FileSetAttrib .

William

Share this post


Link to post
Share on other sites
GianAutoitprogrammer

To delete hidden or system files try this code:

if fileexists("C:\blah.exe") then
Filesetattrib("C:\blah.exe","-RASHOT)
FileDelete("C:\blah.exe")
Msgbox(64, "DONE", "DONE")
else
Msgbox(16, "ERROR", "FAILED")
endif

That should help... :unsure:

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.