Windows batch file required

June 25, 2009 at 06:16:59
Specs: windows server 2003
Hi there,

I'm needing to create a batch file and would like some help if anyone out there thinks this can be done. On our windows server we have 4 extracted files that are created in E:\extracts

These files are:-

Cattle Batches – BTYYYYMMDD.CSV
Cattle Carcasses – CAYYYYMMDD.CSV
Cattle Prices – PRYYYYMMDD.CSV
Supplier Changes – SPYYYYMMDD.CSV

FTP job is required to run at 22:30 to send the files to the Portal Server (address to be advised), put them there with a different name and to archive and delete files on the local Server.

So a 3 stage job is required:-

(1) FTP the file to the Portal Server changing the names as follows:-

Cattle Batches – copy BTYYYYMMDD.CSV to the server as BATCHES_2.txt
Cattle Carcasses – copy CAYYYYMMDD.CSV to the server as CARCASS_2.txt
Cattle Prices – copy PRYYYYMMDD.CSV to the server as PRICES_2.txt
Supplier Changes – copy SPYYYYMMDD.CSV to the server as SUPPLIERS_2.txt

(2) If the FTP is successful then move the files as below:-

Move BTYYYYMMDD.CSV to e:\extracts\archive\batches leaving the filename as BTYYYYMMDD.CSV

Move CAYYYYMMDD.CSV to e:\extracts\archive\carcasses leaving the filename as CAYYYYMMDD.CSV

Move PRYYYYMMMDD.CSV to e:\extracts\archive\prices leaving the filename as PRYYYYMMDD.CSV

Move SPYYYYMMDD.CSV to e:\extracts\archive\suppliers leaving the filename as SPYYYYMMDD.CSV

(3) If the move is successful then look for files of name


in e:\extracts\archive\batches

over 3 months old and delete them.

Ideally also if any stage of this job fails, then it would be nice if an email message could be sent informing us of the failure

A large piece of work I guess, can anyone help? I dont mind sending Paypal cash in return

thanks in advance

See More: Windows batch file required

Report •

June 25, 2009 at 06:48:18
you are asking us to do your work. show what you have got so someone can guide you along.

GNU win32 packages | Gawk

Report •

June 25, 2009 at 07:09:32
I havent got anything as I have been dropped in the poop.. I'm not a batch or script programmer by any stretch of the imagination.. I'm told I should use KiX?

SOS :(

Report •

June 25, 2009 at 16:31:21
any tools/or programming language that has the ability to meet your requirement can do the job. Python , Perl etc. you can do it in batch even. the important thing is , start reading up!

GNU win32 packages | Gawk

Report •

Related Solutions

Ask Question