PDA

View Full Version : [Filled] A batch file that copies .message file


prozak
05-12-2004, 12:29 PM
I am pretty sure this is quite simple to write for some1 that knows how to.

Basically I am looking for a way to copy a .message file to a day dir / week dir. Something that would be possible to use with the scheduler would be perfect. It would be used in order to have the appropriate section rules copied to the new day / week dir after ioA created it (the dir). Thus allowing users to see section rules without haveing to do 'site rules'.

Any help is appreciated, just point me in the right direction. I am willing to learn a ;x

Thanks in advance

toki
05-12-2004, 12:43 PM
first batch (day):xcopy x:\dir\.message y:\store\day\.message /Y
/Y does not ask on overwrite if file exists.
second batch (week):xcopy x:\dir\.message y:\store\week\.message /Ysheduler lines:daymsgcopy = 0 0 * * EXEC ..\scripts\copy\daycopy.bat
weekmsgcopy = 0 0 * 0 EXEC ..\scripts\copy\weekcopy.batwould be my smart guess...

if u want the files to be named with day or week... dunno atm. maybe someone has a smart solution for that in batch.

prozak
05-12-2004, 01:02 PM
That would do exactly what I need. Is it possible to use variables for the target day / week dir. Those dirs change every day and week. That way i could schedule the bat a minute after the new dir is created. Naming of the .message is not neccesary. Just a copy of it as is will do.

Thanks again.

*edit*

I just noticed that on use of the .bat in dos. It will ask whether a file or a dir is being copied. Is there anyway to include that in the bat. I wont be able to tell it which one and it wont do anything until I have.

*edit2*

/a after is the cmd to specify a file is copied not a dir. So that leaves only the issue of the variable target.