Jump to content
Sign in to follow this  
GodForsakenSoul

delete everything

Recommended Posts

GodForsakenSoul

I'm tryin to make a script for my friend to regularly clean C:\Temp\ at given intervals of time.

He knows that there are actual, professional made programs, but apparently, they're not good enough or something...

I'm having a couple of problems with this simple script. First time i actually go into actual file managment (deleting, moving, etc. NOT EDITING.)

According to FileFindFirst()'s wildcard explanation, (FileDelete() referred me there for the wildcard explanation) I can use only one wildcard.

Either * or ?. As far as i understand, * means 0>infinity chars, and ?>1 chars. *.? however, seems to do a rather good job of deleting files with 3 letter extensions.

Unlike in the helpfile, FileDelete("C:\Temp\*") does nothing. nor does *.*

Also, using the folder instead of full file path does nothing. The files are clearly not protected, some, however, are used. Not sure by who.

I think that it's failing BECAUSE the first few files are being used. While I scan the help file for something useful, I would like to hear your input.

I tried shift+deleting everything manually, and got confirmation that the first file is indeed being used.

Deleting folders, ALL OF THEM, is another story. The wildcards, * OR ? don't seem to work, or I am not using them properly.

DirRemove("C:\Temp\*",1) <-Wrong?

The dude manages to generate 17gb/2 hours of temp files, and they are quite a burden. I have no idea what he does, nor do i want to know.

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  

×