#160784 - 2006-04-1309:44 AMRe: rename group of files to current date w/random string
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11634
Loc: CA
Here Darrell,
Give this script a try. It will give a unique name pre-pended to each file plus the current name.
I highly recommend using YYYY-MM-DD as the sorting is much better using that method.
This code will give it the following type of output.
Original file name: computers.txt
It will place YYYY-MM-DD_HHMMSS_ for each file Then it will add a random number after the date/time The resulting file name would be something like this.
2006-04-13_003307_181_computers.txt
There are no checks in place to verify if the source or destination exist. It does not take into account any other type of possible file copy errors.
You supply the SOURCE, FILE-TYPE, DESTINATION and as long as there are no issues preventing the copy it should work fine. If you run it again you will have duplicate files with only the pre-pended name being different (the same as the DirPlus would do)