Move an exact quantity of files
Posted: 31 Aug 2009 18:12
I've researched this for days and cannot resolve this issue and thought I'd ask for some expert advice.
I need to move a quantity of PDF files from one directory to another. They are unrelated as to file name and I must move EXACTLY 8 at a time. What files or the order in which they are moved does not matter as long as exactly 8 are moved in each "batch". The source directory is in constant flux so I figure I'll have to have it loop.
I also need to rename the files as they're being moved to a common name and add a sequence number to each one. Again it doesn't matter what the order is as long as it's sequential 1-8 (e.g. file_1.pdf, file_2.pdf, file_3.pdf, etc.). The name can be the same for each subsequent batch too.
I was thinking about something to move the 8 oldest than "now", but it's beyond my skills. It's selecting the number (quantity) of files that's killing me.
Any advice is greatly appreciated.
I need to move a quantity of PDF files from one directory to another. They are unrelated as to file name and I must move EXACTLY 8 at a time. What files or the order in which they are moved does not matter as long as exactly 8 are moved in each "batch". The source directory is in constant flux so I figure I'll have to have it loop.
I also need to rename the files as they're being moved to a common name and add a sequence number to each one. Again it doesn't matter what the order is as long as it's sequential 1-8 (e.g. file_1.pdf, file_2.pdf, file_3.pdf, etc.). The name can be the same for each subsequent batch too.
I was thinking about something to move the 8 oldest than "now", but it's beyond my skills. It's selecting the number (quantity) of files that's killing me.
Any advice is greatly appreciated.