1.

Solve : Increment file names of copied file?

Answer»

I am not a programmer, but needed to perform some simple move and copy functions to manage our EDI files.  In one STEP, MULTIPLE incoming Purchase Order files are batched into one file, say inbound.edi, which is sent to our ERP system for PROCESSING.  Since this file will be overwritten the next time we pick up new files, I would LIKE to copy the file to a backup directory.  Obviously, I can't keep a copy of each unless their filename is somehow changed or appended incrementally.  Is there a command to increment the file name during a copy so each copy is uniquely named in the new directory?  (Similar to date-time stamp question, but does not necessarily have to be date-time stamp - could just be sequential numbering).
THANK YOU! - Briantry this..it may be clunky and depending on the size of your files
make a dummy file called   dumm
then add your first file , firstf to dumm by

copy   dumm+firstf

i do  not how to get rid of the copy (y/n/etc) but in earlier versions of dos the question does not appear

it will add to dumm

the next  time  you can add secondf

or it can still be called firstf (in case you are spooling out the directions to someone else)

you use
copy  dumm+ secondf



and dumm will have both firstf and secondf

the only other way i know how to do this is a simple routine using dbase or clipper


I can't see other SOLUTION than a small program... In C, in Java, but you have to talk to someone to help you with that. It's easy to do. I don't know to do that using Windows command line tools.



Discussion

No Comment Found