AutoHotkey Community

It is currently May 27th, 2012, 12:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: November 27th, 2009, 5:57 pm 
Offline

Joined: May 29th, 2008, 5:02 pm
Posts: 21
Location: Madison, WI
I've been trying to use FileRemoveDir/FileCreateDir to occasionally clean out some directories and noticed that not all of the files in some of the directories were being deleted.

Upon further investigation I discovered that one of the files was locked open. When FileRemoveDir encountered the locked file it stopped immediately, and all files after the locked file remained. I tried removing the directory using the rd command and it removed everything except the locked file.

Is there something I'm missing or am I going about this all wrong?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2009, 7:30 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
I think this is normal Windows behavior.
Use
Code:
Loop, c:\Temp,,1
FileDelete % A_LoopFileFullPath

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2009, 5:47 pm 
Offline

Joined: May 29th, 2008, 5:02 pm
Posts: 21
Location: Madison, WI
Thanks!

I'll give your code a shot.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Leef_me, Maestr0, Pulover, rjgatito, XstatyK, Yahoo [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group