creating schedule tasks
Can anyone teach me how to create a schedule task that runs on a scheduled time and day which allows me to delete unwanted files from a folder.
thanks and regards,
Windows Forum
Can anyone teach me how to create a schedule task that runs on a scheduled time and day which allows me to delete unwanted files from a folder.
thanks and regards,
by skitzizzy
First you will need to write up a batch file to delete the files in the directory you want. Save the batch file to a convenient location, probably in the folder you wish to clean.
Then go to your control panel, select Schedule Tasks and set up the task scheduler to run the batch file at a specified time.
by choy.waigiat
Can you tell me what are the commands to type to create the batch file. Show me an example.
by skitzizzy
Open notepad and type something along the lines of:
REM This script deletes files from C:\test
cd \
cd test
del testfile.txt
pause
Save the file as filename.BAT or filename.CMD. If you want to delete all files of a particular extension type, use del *.txt
If you want to delete all the files, use del *.*
Hope that helps you
by choy.waigiat
by skitzizzy
You can query what switches an executable uses by opening the a command line and typing filename /?. In this instance, use del /?
But as you ask, to do it in quiet mode, use the /q switch...ie:
del *.txt /Q
I thought del will only prompt if you use the /p switch as well? Oh well.
by choy.waigiat
by skitzizzy
by choy.waigiat
Poster rated this answer.
by choy.waigiat
This discussion is closed to new replies.
Sort by Trending