euverve Posted September 9, 2008 Share 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... Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 9, 2008 Share 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] Link to comment Share on other sites More sharing options...
euverve Posted September 9, 2008 Author Share Posted September 9, 2008 IniRead() and FileDelete()How about applying to all drives? Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 9, 2008 Share 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] Link to comment Share on other sites More sharing options...
euverve Posted September 9, 2008 Author Share 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 Link to comment Share on other sites More sharing options...
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