How to sort numeric/alpha name by alpha then number in WindowsExplorer


M

Mel

I have a zillion pics with file names like 28 Maple Ave.jpg and 1428
Hickory St.jpg and 56 Applegate Way.jpg.

How can I have Windows Explorer sort them first by street name and
then by street number?

Right the files are sorted by number so all the 28's are together,
then all the 29's are together, etc.

Thanks for any info,..

Mel
 
Ad

Advertisements

T

The Moose

I have a zillion pics with file names like 28 Maple Ave.jpg and 1428
Hickory St.jpg and 56 Applegate Way.jpg.

How can I have Windows Explorer sort them first by street name and
then by street number?

Right the files are sorted by number so all the 28's are together,
then all the 29's are together, etc.

Thanks for any info,..

Mel


You're limited in what you can do with Windows Explorer.

If I were going to do something like this, first, I would change the
naming convention of the files, like so:
Applegate Way - 0056.jpg.
Applegate Way - 0156.jpg.
Applegate Way - 0356.jpg.
Applegate Way - 0456.jpg.
Hickory St - 1328t.jpg
Hickory St - 1428t.jpg
Hickory St - 1428t.jpg
Hickory St - 1448t.jpg
Maple Ave - 0028.jpg
Maple Ave - 0128.jpg
Maple Ave - 0328.jpg
Maple Ave - 0428.jpg

Note that I brought the numbering out to four places to be the same
length as the longest number that you showed in your example.
Otherwise, you might get strict text-sorting like this:
1
100
15
2
200
3
325

You could use macros to put the names back into real-life address-
format using Excel or Word if you needed to have a list of the files
in real-life-address format.

There's a piece of freeware that's absolutely phenomenal for renaming
TONS of files: http://www.1-4a.com/rename/. The 'expert mode' gives
you a lot more options for renaming files.

Barb

PS: Another option to think about might be to have a separate folder
for each street name and then have the files themselves numbered to
equate with the actual address. Again, I think you'd need to fill in
the addresses with leading zeroes so that all addresses would be the
same length for sorting.
 
R

Roy Smith

Mel said:
I have a zillion pics with file names like 28 Maple Ave.jpg and 1428
Hickory St.jpg and 56 Applegate Way.jpg.

How can I have Windows Explorer sort them first by street name and
then by street number?

Right the files are sorted by number so all the 28's are together,
then all the 29's are together, etc.

The way Windows Explorer sorts files is hard coded into the program and
there are no options to change it, other that to list the sorted files
in ascending or descending order.

The only way to do what you are asking is by renaming your files to
"street_name street_number.jpg". Or maybe you just need a better way to
organize your files? For example why not have a folder for each street,
then place the pictures from that street in the folder of the same name.
 
M

Mel

The way Windows Explorer sorts files is hard coded into the program and
there are no options to change it, other that to list the sorted files
in ascending or descending order.

The only way to do what you are asking is by renaming your files to
"street_name street_number.jpg".  Or maybe you just need a better way to
organize your files?  For example why not have a folder for each street,
then place the pictures from that street in the folder of the same name.

--

Roy Smith
Ubuntu 8.10 Intrepid Ibex
Remove N O S P A M when replying by email.

Roy and Barb, your suggestions are valid, and they are good ideas for
the future.

Right now, though, I have literally several thousand pics named in the
format NNN STREETNAME.JPG

I was hoping to find some way to have Windows Explorer sort them first
by streetname, and then by number within streetname,.. but if there is
some other program that will do this, I am flexible.

I looked at http://www.1-4a.com/rename/ and it appears there may be a
way for this freeware to do what I want. In the FAQs there is this
procedure:


"I want to change the position of existing numbers to the front"

Old file names
pic01.jpg
pic107.jpg
pic7.jpg

New file names
01pic.jpg
107pic.jpg
7pic.jpg

* Check the Swap/Add field and set Separator to "$". This will
treat a number as a separator.
* Set the Swap field to "<0><1><2>"

Do you think it will work the same for moving numbers from the front
to the rear of the name? If so, my problem is solved,.... I can just
change "56 Applejack Way" to "Applejack Way 56" and re-sort.
 
Ad

Advertisements

T

The Moose

Roy and Barb, your suggestions are valid, and they are good ideas for
the future.

Right now, though, I have literally several thousand pics named in the
format NNN STREETNAME.JPG

I was hoping to find some way to have Windows Explorer sort them first
by streetname, and then by number within streetname,.. but if there is
some other program that will do this, I am flexible.

I looked athttp://www.1-4a.com/rename/and it appears there may be a
way for this freeware to do what I want.  In the FAQs there is this
procedure:

     "I want to change the position of existing numbers to the front"

     Old file names
     pic01.jpg
     pic107.jpg
     pic7.jpg

     New file names
     01pic.jpg
     107pic.jpg
     7pic.jpg

      * Check the Swap/Add field and set Separator to "$". This will
treat a number as a separator.
      * Set the Swap field to "<0><1><2>"

Do you think it will work the same for moving numbers from the front
to the rear of the name?  If so, my problem is solved,.... I can just
change "56 Applejack Way" to "Applejack Way 56" and re-sort.



Mel,
-------

I did some experimenting with the 1.4a Rename software using the
following filenames:

28 Maple Ave.txt
1428 Hickory St.txt
56 Applegate Way.txt

Ran them through 1.4a Rename using these parameters:
NB: MAKE SURE YOU BACKUP YOUR FILES TO A NETWORK FOLDER OR TO A
DESKTOP FOLDER OR TO A ZIP FILE BEFORE YOU START WORKING WITH THEM.

Start Rename. Press [F2] to get to the advanced functions. Set the
settings as follows:

*.jpg <<-- filename that you will be working with.
check subdirectories and indicate the number of sublevels if your
files are not all located at the same directory level.
Locate the directory the contains the files that you will be working
with.
Select the radio button for 'name' indicating that you will be working
only with the filename and not the extension.

In the next box select:

'Swap/add'
the Separator will be $
The parameters in the box just under 'Separator' will be <2>-<0><1>
Indicate that you will be working with the first occurrence.

On the upper right-hand side the parameters should be:

(n)ame / n /
check 'a1 < 'a02' / check X to top
check 'Instant Preview' / check 'Instant Problem Checking'

At the lower right, click on the 'Start' button.

On the tiny sample of text files that I worked with, I got the
following results. You'll notice that they are now alphabetical by
the first characters of the street names.

Applegate Way-56.txt
Hickory St-1428.txt
Maple Ave-28.txt

I added a few files manually to see what kind of results I would get
with more street numbers. Here are the results. You'll see that the
street numbers are sorted after the street names. Note the dash
before the street number ... this is to make the number stand out.
It'll also act as a unique Separator to give you a way to reset the
data if you need to.

Applegate Way-56.txt
Applegate Way-227.txt
Applegate Way-560.txt
Hickory St-4.txt
Hickory St-1428.txt
Maple Ave-28.txt

I only worked with a very small sample, but I think if: (1) You name
your streets consistently (ii.e., always abbreviate the word Street
and Boulevard, etc. or always spell them out fully ... in other words
consistency in the data; and (2) I don't think that you'll need to
lead-fill with zeroes the street numbers if the street names are
absolutely consistent.

From my small sample, I think you're going to get the results that
you're looking for just by using 1.4a Rename. BUT, make sure you have
a real good backup of your entire data set BEFORE you start working so
that you can get back your data if you need to.

Also, just under the "Start' button in 1.4a Rename is a box to check
'Don't rename problematic files' -- I would select that so that any
filenames that fall outside the parameters don't get renamed. Since
you know the data, you should be able to spot any anomalies, before
you go live with the filename conversion.

Good luck.

Barb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top