For every question, there's an answer -- and you'll find it here!


Printer-friendly copy
Top The PC Q&A Forum The Computer Forum topic #2444
View in linear mode

Subject: "Program to sort files by "name" into folders" Previous topic | Next topic
happywareMon Dec-17-01 11:21 PM
Charter member
54 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
"Program to sort files by "name" into folders"


          

for example if I had 5000 pictures in a directory and I wanted to place them in numbered folders (named 0-9) and sort them into these folder.

For example all files with "_02" I want to place into the folder called "C:\2\" and so on.

I know the long way.... (using the find command in the folder where the images or files appear) but this is something I want done automatically. Anysoftware that would allow this by clicking a few buttons? I don't have trouble doing basic scripts (if the program is well documented) and I'm in the process of working on a windows type program for this purpose but until then I'm pretty stuck.

Hopefully a solution exists! =-)




  

Alert Printer-friendly copy | | Top

Replies to this topic
Subject Author Message Date ID
check in here:
Dec 17th 2001
1
RE: Program to sort files by "name" into folders
Dec 18th 2001
2
RE: Program to sort files by
Dec 18th 2001
3
RE: Program to sort files by
Dec 18th 2001
4
      RE: Program to sort files by
Dec 18th 2001
5

RoperaMon Dec-17-01 11:28 PM
Charter member
5863 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#1. "check in here:"
In response to happyware (Reply # 0)


          

http://www.nonags.com/mirrors.html

there are some proggies to rename multiple files.

  

Alert Printer-friendly copy | | Top

SteveYandlTue Dec-18-01 12:33 AM
Charter member
6481 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#2. "RE: Program to sort files by "name" into folders"
In response to happyware (Reply # 0)


          

This could be done fairly easily with a visual basic script using the file system object. You iterate through the collection of files in the named target folder and use "select..case" along with the InStr function and filecopy to act on the files.

Are the folders already present?
Are the files you're going to separate in a single folder or a collection of subfolders?
Are you wanting to move or copy the files and how do you want to handle over-writes?
Are you wanting to run the script from command line, double click, or drag and drop?

  

Alert Printer-friendly copy | | Top

NytOwlTue Dec-18-01 05:55 AM
Charter member
656 posts
Click to send email to this authorClick to view this author's profileClick to add this author to your buddy list
#3. "RE: Program to sort files by"
In response to happyware (Reply # 0)


          

When you have these files displayed in the right hand window of Explorer, can't you click on the Name button above the column of file names to organize them by name, then Cut/Paste them a group at a time into the folders.

(The toolbar above the files will have buttons for Name | Size | Type | Modified | Attributes|)

NytOwl

  

Alert Printer-friendly copy | | Top

    
EdHartTue Dec-18-01 05:39 PM
Charter member
702 posts
Click to send email to this authorClick to view this author's profileClick to add this author to your buddy list
#4. "RE: Program to sort files by"
In response to NytOwl (Reply # 3)


          

happyware,maybe your computer is different than mine. If I simply put the files in a folder, exit the folder, then return to the folder, the files are automatically in alphabetical order. Sounds to me like your biggest problem is getting the files there in the first place.??
Ed.

Simply select one,then press ctrl on each of the others you would like to select and then choose 'Edit' and move the files to whatever folder you like.

  

Alert Printer-friendly copy | | Top

        
SteveYandlTue Dec-18-01 08:26 PM
Charter member
6481 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#5. "RE: Program to sort files by"
In response to EdHart (Reply # 4)


          

Ed,

I think that the challenge for happyware is that the songs might be like:

The rock song_02.mp3
A country song_04.mp3
New rock song_06.mp3

If the criteria for sorting into one of the ten folders 01-10 is the presence of the correct two digit marker as part of the title but the numbers are not at the front of the file label, then a file sort will not make the organization any easier. In script, you have various text functions that allow you to return the position of a substring. You can use that tool to determine if a certain substring is present or not and use that condition as a sorting device.

The script would be easy to do but it takes enough time to do that I'll wait to make sure that happyware is still around before I write it up.

  

Alert Printer-friendly copy | | Top

Top The PC Q&A Forum The Computer Forum topic #2444 Previous topic | Next topic
Powered by DCForum+ Version 1.27
Copyright 1997-2003 DCScripts.com
Home
Links
About PCQandA
Link To Us
Support PCQandA
Privacy Policy
In Memoriam
Acceptable Use Policy

Have a question or problem regarding this forum? Check here for the answer.