Jump to content

Recommended Posts

Posted

Hi

I want to delete a file, e.g. with Filename "abc" (no extension). If i use

FileDelete("c:\abc")

that works. But: if there exists a directoy c:\abc instead of a file, the same command deletes me the content of that directory(!)

How can i be sure to delete only a file, but never a directory (-content) with the same name?

Sure, i could use

FileDelete("c:\abc*")

but that deletes me all files, beginning with "abc...".

Greetings,

Roman.

Posted

Try this:

FileDelete("D:\abc.*")

"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

Posted

Try this:

FileDelete("D:\abc.*")
Hm.. Yes that works, but it deletes me the file "abc" with every extension, abc.txt, abc.doc and so on.

I want to by sure to touch only the file "abc". No more and not less.

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
  • Recently Browsing   0 members

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