Moving Puzzle
Hello, guys. I need a script for moving files.
There are a lot of examples and tutorials but I can't find anything like this:
I have a folder "DIR" that contains subfolders "DIR/a", "DIR/b" and "DIR/c". And each subfolder contains files ",1", ",2" and ",3".
Question: how can I move these files to the subfolder DIR/x in such a manner that files would be renamed and lined up in the following order: "1, 2, 3, 4, 5, 6, 7, 8, 9", if the folder DIR/x is empty. And if it already contains some files, the order would continue starting from the smallest name of the file like : "10, 11, 12 and so on" ?
Will be very grateful for any help.
Last edited by Blyiss; 02-23-2007 at 06:28 PM.
|