Question

Locked

Batch file to run based on the date and time

By sathishfiles ·
Tags: Off Topic
Need help for batch file as im not gud in it.
The scenario is i need to copy emails .msg file over network folder which i have already shared.
the problem is all the .msg file looks like this wit numbers: 10005.msg,100052,100053,100054..etc incremental numbers.
I need to copy based on the day and time, let say on monday from 12am-12pm, Tuesday copies the prev day 12pm-12am. Wed,thurs,friday,sat and sun. so that i dont miss and emails..based on the day and time. The .msg files are incremental and i dont want to copy the same emails .msg files.

C:\backup\(inside all the emails .msg files stored) need to copy to X:\archive\(in here)

Gues the best way of doing this is based on the date and time.
Right now im copying it manually based on the date and time. Any one pls help me ..

This conversation is currently closed to new comments.

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

All Answers

Collapse -

Check the links referenced in this article.

by 1bn0 In reply to Batch file to run based o ...

http://forums.techguy.org/dos-pda-other/735372-batch-file-copy-files-based.html

Collapse -

xcopy

by Snuffy09 In reply to Batch file to run based o ...

use the xcopy command (in windows XP or &gt

syntax example: xcopy /switches "source" "destination"

play with the /d switch for date (dont focus on the file name "date" but the actual date the file was created/changed/modified)

Collapse -

What you need is a simple...

...NTBackup Schedule. If you are running any flavour of Windows since NT3.5 and upto XP, you will be able to go to Start, Run, NTBackup.exe and set up a schedule based on the time and date and to a specific, and in your case, I presume a network (X:) location. In WinVista, you will need to run C:\Windows\System32\sdclt.exe for Windows Backup.

In both, select the folder that needs to be backed up, then select the location (vice versa, in Vista), then set a schedule.

Back to After Hours Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums