Jump to content

FileDelete form @TempDir � problem


Recommended Posts

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

  • Moderators

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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...