Phantomasss Posted May 15, 2009 Share Posted May 15, 2009 Hello, my Script on startup create any .tmp file in temp (@TempDir) directory, for example: ~DFA31.tmp, ~DF3D3F.tmp, etc. I must delete one other file (file.txt) in temp (@TempDir) directory, i got this file from a server (InetGet). As i understand *.tmp file forbids to delete my file in @TempDir . How to delete an unnecessary file from temp (@TempDir) directory? Thanks! Link to comment Share on other sites More sharing options...
Zedna Posted May 15, 2009 Share Posted May 15, 2009 What's wrong with this: FileDelete ( @TempDir & '\*.tmp') Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 15, 2009 Moderators Share Posted May 15, 2009 If the file has a handle open by another file, you wont' be able to delete it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Phantomasss Posted May 15, 2009 Author Share Posted May 15, 2009 (edited) What's wrong with this: FileDelete ( @TempDir & '\*.tmp') Other *.tmp files maybe important for other programms. To delete them not correctly. I try this now: FileDelete (@TempDir & "\*.tmp") FileDelete (@TempDir & "\1.txt");File from InetGet Result: fail. All of .tmp files are deleted except for *.tmp file by my script and 1.txt (. Edited May 15, 2009 by Phantomasss Link to comment Share on other sites More sharing options...
Phantomasss Posted May 16, 2009 Author Share Posted May 16, 2009 FileClose() decided my problem . Thanks and sorry... 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