euverve Posted September 9, 2008 Posted September 9, 2008 How could i delete files in all drives (may exist or not)? This file is specified in my .ini file. So that I want to delete a certain file, i just add it to my .ini file. Thanks...
dbzfanatic Posted September 9, 2008 Posted September 9, 2008 IniRead() and FileDelete() Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
euverve Posted September 9, 2008 Author Posted September 9, 2008 IniRead() and FileDelete()How about applying to all drives?
dbzfanatic Posted September 9, 2008 Posted September 9, 2008 Use a loop to loop through the drives. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
euverve Posted September 9, 2008 Author Posted September 9, 2008 Use a loop to loop through the drives. Any body could improve my code? Thanks ---------------------------------------------------------------- $DISK = DriveGetDrive("ALL") & "\" $files = IniReadSection("deletefiles.ini", "Files") $del = $DISK & $files If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else For $I = 1 To $del [0] $STATS = DriveStatus($DISK[$I]) If $STATS = "READY" Then FileSetAttrib($del[$I], "-RSH+N") FileDelete($del[$I]) EndIf Next EndIf ---------------------------------------------------------------- Any suggestions, thanks
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now