Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

kill

Status
Not open for further replies.

bosky

Programmer
Oct 30, 2003
15
IN
Kill "*.TXT"
why wont this work right, I want it to kill all .txt files in the directory and the subdirectorys within. Thanks
 
Kill "*.TXT" will only kill the *.TXT files in the current directory. You can specify the path but I don't think you can kill all the text files in the associated subdirectories. I started out with nothing, and I still have most of it.
 
If you want to kill all the .TXT files in the current directory AND subdirectories, use the Shell command to shell out the DOS command with the appropriate switch. It is probably the easiest method.

Shell("cmd /c ERASE *.txt /s")

Make sure you are in the correct directory to start with of course!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top