MadBoy Posted October 11, 2007 Share Posted October 11, 2007 (edited) I don't know if the hangover is giving me hard time or what but doing simple FileDelete(@tempdir & "\*.*") doesn't work while when i do FileDelete(@tempdir & "\*.nfs") or FileDelete(@tempdir & "\*.txt") it works fine deleting the files as needed. Also i tried to run the function below on the @tempdir and it didn't work. Maybe i'm missing something here so don't bash me for my hangover just yet but maybe there's something wrong with *.*. Func _DirRemoveContents($folder) Local $search, $file If StringRight($folder, 1) <> "\" Then $folder = $folder & "\" If NOT FileExists($folder) Then Return 7 FileDelete($folder & '*.*') $search = FileFindFirstFile($folder & "*") ;// Find folders If $search = -1 Then Return 0 While 1 $file = FileFindNextFile($search) If @error Then ExitLoop If StringRight($file, 1) = "." Then ContinueLoop DirRemove($folder & $file, 1) WEnd Return FileClose($search) EndFunc Both newest beta and production version tested. Edited October 11, 2007 by MadBoy My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
Developers Jos Posted October 11, 2007 Developers Share Posted October 11, 2007 I will speak softly My guess is that there is a file in the @tempdir folder that cannot be deleted and the FileDelete() function stops and give an 0 returncode. Did you check the returncode ? and.... Why are you posting it here when you are not sure its a Bug? thought it should be pretty clear that "Possible Bugs" questions must be posted in the Support forum untill its known there is a bug ... Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MadBoy Posted October 11, 2007 Author Share Posted October 11, 2007 I will speak softly My guess is that there is a file in the @tempdir folder that cannot be deleted and the FileDelete() function stops and give an 0 returncode.Did you check the returncode ?and.... Why are you posting it here when you are not sure its a Bug? thought it should be pretty clear that "Possible Bugs" questions must be posted in the Support forum untill its known there is a bug ... Jos Ye Jos, noticed this too late, wanted just post replay that "nevermind". Not being fresh at work kills me My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
Developers Jos Posted October 11, 2007 Developers Share Posted October 11, 2007 Ye Jos, noticed this too late, wanted just post replay that "nevermind". Not being fresh at work kills me np... moved to support ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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