Computer Hope

Microsoft => Microsoft DOS => Topic started by: Zidane00 on February 16, 2007, 12:39:25 AM

Title: Batch Help
Post by: Zidane00 on February 16, 2007, 12:39:25 AM
Hello,

Ik need some help with a batch file.

I need to run an allready existing batch file at 4 differends times.

at 9,30 10,30 14.00 and 19,00. at a daily basis

That part is done, but i need some help for the placing from the outcome of the batch-file.
I need to place it in a mapping from that day and because i need all the data. It may not overwriten. So the outcome is that there are 4 txt files in 1 map,

Can someone help.

Thnx

Chris
Title: Re: Batch Help
Post by: Spoiler on February 16, 2007, 12:49:03 PM
What I would do is to use Windows scheduler to run 4 differant batch files. Setup batch one to run at 9:30 with a out put of zxy.txt than run batch 2 with a out put of abc.txt etc....


For /f "tokens=2-4 delims=/ " %%a in ('date/t') do (
Set month=%%a
Set day=%%b
Set year=%%c
)
REN C:\your_path\file_name.TXT file_name%year%%month%%day%.TXT