Question

Locked

VBS scripting

By mckevitt ·
Hi

I have recently been doing some reading on VBS scripts. I believe these can help me with a little issue I have but im a little confused on how they work/how to run them.

Basically I have a Scan folder, that users scan files into. I would like to clear this folder out every 24 hours as users tend to copy and paste out of this location and dont delete them. lets say for instance the file location is C:\Scan

What type of code would I use to clear this out?? where would I store the code? and how would I get it to automatcally run?

I have don loads of reading up on this and its as clear as mud to me!!

Thanks in advanced for any help.

Cheers

Tom

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

A batch file would be easier

by Slayer_ In reply to VBS scripting

You make a batch file.
http://wiki.answers .com/Q/How_do_you_make_a_batch_to_delete_files_in_a_certain_folder

Now, make a scheduled task that runs that batch file.
Since you didn't say your OS, here is how to do it for XP
http://support.microsoft .com/kb/308569

And windows 7
http://windows.microsoft .com/en-CA/windows7/schedule-a-task

To make the links work, copy them into your browsers address bar, remove the space between the address and the .com and hit your enter key on your keyboard.


VBScript is not a good tool for filesystem management unless you need to do very complicated decisions on each file. It's like shooting yourself in the foot with a bazooka, it gets the job done but its overkill.

http://www.toodarkpark .org/computers/humor/shoot-self-in-foot.html

Back to Software Forum
2 total posts (Page 1 of 1)  

Software Forums