dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
413

Caddyroger
Premium Member
join:2001-06-11
To the west

Caddyroger

Premium Member

Automaticaly deleting a file at a certain time.

Please move if in the wrong forum.
I would like to know if this is possible. I would like at 2am every mourning go to drive R and delete Test( example). Are there a way to do this?

dandelion
MVM
join:2003-04-29
Germantown, TN

dandelion

MVM

I am assuming this is for a windows computer.. which windows and are you asking if there is a software program that will do this?

DataDoc
My avatar looks like me, if I was 2D.
Premium Member
join:2000-05-14
Hedgesville, WV

2 recommendations

DataDoc to Caddyroger

Premium Member

to Caddyroger
Make a batch file with a delete command in it and run it using scheduler.
BlitzenZeus
Burnt Out Cynic
Premium Member
join:2000-01-13

1 recommendation

BlitzenZeus to Caddyroger

Premium Member

to Caddyroger
Seems it would be simple enough to make a script like a batch file(.bat), and make a scheduled task.

Caddyroger
Premium Member
join:2001-06-11
To the west

3 edits

Caddyroger

Premium Member

Click for full size
Click for full size
Click for full size
Ok guys I have been working on this for a while. I googled making a batch file and read the how to. I am not able to get it to run. The first pic is where I have the folder. The second one is the way I have the batch file written in note pad. The third is what I get in the command window.

NS4683
join:2000-08-25
NJ

NS4683

Member

I don't use Windows, but don't you need to use quotation marks for "H:\DELETE TEST\TEST2.txt" because of the space in the directory?

Caddyroger
Premium Member
join:2001-06-11
To the west

Caddyroger

Premium Member

I possibly found the problem. I do not think you can use spaces in the directory name. I tried just using h:\test2 txt and it worked. I then tried using h:\delete\test2.txt and it work.

darkwish
Free Knight
Premium Member
join:2003-09-12
Fairfax, VA

darkwish

Premium Member

If your directory name has spaces, you'll need to wrap it in quotes as NS4683 mentioned.

Caddyroger
Premium Member
join:2001-06-11
To the west

Caddyroger

Premium Member

said by darkwish:

If your directory name has spaces, you'll need to wrap it in quotes as NS4683 mentioned.

Thanks I remember that the next time I make a batch file. I jsu got done renaming the Dir and folders names.
Caddyroger

Caddyroger

Premium Member

OK I have troubles again. This what I am tring to do I want to delete Marcium Rreflect bac up file 2am and then have MR make a new image at 3am every mourning. Mr saves the image as image-00-00.mring. I tried to us quotes around all and -00-00 but get the file not found again. How would get this to work.
The is H:\delete\test5-00-00

John Galt6
Forward, March
Premium Member
join:2004-09-30
Happy Camp

John Galt6

Premium Member

You should do the new backup THEN delete old file...

Too much risk in doing it the other way. Murphy can have his way with you if you're not careful.
fenix_jn
join:2006-12-28
Miami, FL

fenix_jn to Caddyroger

Member

to Caddyroger
The command would be delete "H:\delete\test5-00-00" (assuming that you are deleting a file named 'test5-00-00' inside folder 'delete'). As far as performing the deletion regularly, you could create a task using the task manager and have it run the batch/single command at the specific time you want.
HarryH3
Premium Member
join:2005-02-21

1 recommendation

HarryH3 to Caddyroger

Premium Member

to Caddyroger
said by Caddyroger:

I want to delete Marcium Rreflect bac up file 2am and then have MR make a new image at 3am every mourning.

You need a bigger drive to properly store your backups. As John Galt stated, deleting your old backup BEFORE you make a new backup is a bad thing. If the new backup fails for some reason, you no longer have ANY backup.
Expand your moderator at work