Sign in to follow this  
Followers 0
Phantomasss

FileDelete form @TempDir � problem

5 posts in this topic

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!

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by Phantomasss

Share this post


Link to post
Share on other sites

FileClose() decided my problem :). Thanks and sorry...

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0