file renaming utility

robphelan

Diamond Member
Aug 28, 2003
4,084
17
81
I've got a large, tedious job to do.

For work, we run this inbound interface that processes a file by its name - let's say inbound.dat

In our Test environment, we're making changes, so we want to run several hundred inbound files through(we can only run them one by one since the file names are the same, otherwise they'd overwrite each other) which we retrieved from our archive directory.

They all have date/timestamps on them, to make the file names unique - inbound.dat20130115_112301

Now, I have two possible solutions:

1) I could prepare the files ahead of time by renaming the each to inbound.dat and create a new directory for each one (since the file names are the same). That way, all i have to do is drop them manually into the interface's directory.

OR

2) feed these files into some sort of batch list processing that will rename them one at a time and drop them into the interface's directory every 3 minutes.

Any ideas?
 

lxskllr

No Lifer
Nov 30, 2004
57,905
8,176
126
I think writing a script is a grand idea. It'll be good for exercising your brain, and you can adapt it for future needs.