Go Back   FlashFXP Forums > > > >

! Requests Need a script or some sort of cool .bat file ? Ask here!

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-12-2004, 12:29 PM   #1
prozak
Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Apr 2004
Posts: 30
Default a .bat that copies .message file

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
prozak is offline   Reply With Quote
Old 05-12-2004, 12:43 PM   #2
toki
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 221
Default

first batch (day):
Code:
xcopy x:\dir\.message y:\store\day\.message /Y
/Y does not ask on overwrite if file exists.
second batch (week):
Code:
xcopy x:\dir\.message y:\store\week\.message /Y
sheduler lines:
Code:
daymsgcopy      = 0 0 * * EXEC ..\scripts\copy\daycopy.bat
weekmsgcopy     = 0 0 * 0 EXEC ..\scripts\copy\weekcopy.bat
would 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.
toki is offline   Reply With Quote
Old 05-12-2004, 01:02 PM   #3
prozak
Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Apr 2004
Posts: 30
Default ah Thanx :-)

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.
prozak is offline   Reply With Quote
Reply

Tags
day, dir, file, rules, week

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:12 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)