Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Delete a folder when it has files.
Name: Geralds Mod Date: December 1, 2007 at 15:55:56 Pacific OS: win xp CPU/Ram: centrio duo Product: dell inspirion
Comment:
I need a batch file that deletes a folder automatically whenever something is added to it.
I want to do this because I scanned my computer and it found 17 virus's. All from my brothers temp. internet files. I need it to delete his temp internet files folder whenever he downloads something.
Name: StuartS Date: December 1, 2007 at 19:37:04 Pacific
Reply:
I think you are going about it the wrong way. You don't have to download a file to create temporary Internet files, just connecting to a web site will do it. By the time you get round to running a batch file, the damage will have been done.
Besides you wont be able to delete any temporary internet files while the session that created them is still active.
You need a decent AV application and some anti-spyware software. There are plenty of free ones available. Stop the horse from escaping in the first place instead of closing the stable door after he is gone.
Summary: Thanks klint it seems windows or at least vista wont let you delete a directory if it has files in it. I think I found what I was looking for. I will post it here maybe it will help someone else. The ...
Summary: Can someone tell me how i can get a list of subdirectories and store them into an array? for example, at the DOS command prompt if you type in 'dir' it gives you a list of subdirectories...i want to d...
Summary: when I use MORE or TYPE command in my Windows batch script to remove the first line from a text file like this: type Filename.txt | find /v "FILEHEADER" > Newfile.txt it would remove the first line. B...