Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file sort

Status
Not open for further replies.

hamzasyed

Technical User
Oct 5, 2012
2
CA
Hi,
I have pdfcreator which saves a pdf file into a certain output folder every time something prints. Is there any way to get these pdfs to save and sort automatically into another folder based on their filename? Can I use windows task manager or is there a simple script i can use. I know there are programs out there, but I would like to have my own. It seems simple, hope you guys can help?
 
You can use the FileSystemObject to Move or Copy files from your output folder to some other folder of your choosing. You will need a reference to Microsoft Scripting Runtime to use the FileSystemObject.

It would not be very difficult to collect file names, sort them and then move or copy them in alphabetical order. I do believe though that adding files to a folder is like adding marbles to a bag of marbles. There is no assurance that the order when you view or otherwise retrieve them will be the same as the order in which you added them.

Was there some other purpose to your "sort and add" goal?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top