Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch Help  (Read 2376 times)

0 Members and 1 Guest are viewing this topic.

Zidane00

  • Guest
Batch Help
« 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

Spoiler



    Specialist

    Thanked: 50
  • Experience: Beginner
  • OS: Windows XP
Re: Batch Help
« Reply #1 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




« Last Edit: February 16, 2007, 12:52:31 PM by Spoiler »
Whenever I watch TV and I see those poor starving kids all over the world, I can't help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff." - Mariah Carey, Pop Singer