Renaming multiple files

stuart

Distinguished
Apr 5, 2004
168
0
18,680
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Is there away to automatically rename lots of files which are all in the same
folder, so I don't have to do it manually? I tried using the RENAME in the
Command Prompt but that would only work for one file.

This is a basic example of what I need to do lots of times to many more
files in many folders. I have these 3 files:

Red1.txt
Red2.txt
Red3.txt

and want them to be renamed

Blue1.txt
Blue2.txt
Blue3.txt

How would I go about doing this, I guess using a wildcard would be good and
also my files always end in a number, just like the example above.

Many thanks.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Highlight them all
Then right click any of them.
Be sure they are all still highlighted and click Rename
Type the name you want and they will have the same name with sequential
numbers at the end.

--
Jupiter Jones [MVP]
http://www3.telus.net/dandemar
In memory of our dear friend, MVP Alex Nichol
http://www.dts-l.org


"stuart" <stuart@discussions.microsoft.com> wrote in message
news:2BB2BDB3-1808-45AF-A3C7-A54029865AB4@microsoft.com...
> Is there away to automatically rename lots of files which are all in the
> same
> folder, so I don't have to do it manually? I tried using the RENAME in the
> Command Prompt but that would only work for one file.
>
> This is a basic example of what I need to do lots of times to many more
> files in many folders. I have these 3 files:
>
> Red1.txt
> Red2.txt
> Red3.txt
>
> and want them to be renamed
>
> Blue1.txt
> Blue2.txt
> Blue3.txt
>
> How would I go about doing this, I guess using a wildcard would be good
> and
> also my files always end in a number, just like the example above.
>
> Many thanks.
 

stuart

Distinguished
Apr 5, 2004
168
0
18,680
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Thanks for the response but if I apply that method it keeps the number of the
one I rename and copies that with the renaming and includes a sequencal
number in brackets. So for the example I would get:

Blue1.txt
Blue1 (2).txt
Blue1 (3).txt

Which is not what I want to have happen.

Is it possible to create a batch command in Notepad so that I have a *.bat
to double-click? I have heard of these but have no idea how to make one.

Regards.

"Jupiter Jones [MVP]" wrote:

> Highlight them all
> Then right click any of them.
> Be sure they are all still highlighted and click Rename
> Type the name you want and they will have the same name with sequential
> numbers at the end.
>
> --
> Jupiter Jones [MVP]
> http://www3.telus.net/dandemar
> In memory of our dear friend, MVP Alex Nichol
> http://www.dts-l.org
>
>
> "stuart" <stuart@discussions.microsoft.com> wrote in message
> news:2BB2BDB3-1808-45AF-A3C7-A54029865AB4@microsoft.com...
> > Is there away to automatically rename lots of files which are all in the
> > same
> > folder, so I don't have to do it manually? I tried using the RENAME in the
> > Command Prompt but that would only work for one file.
> >
> > This is a basic example of what I need to do lots of times to many more
> > files in many folders. I have these 3 files:
> >
> > Red1.txt
> > Red2.txt
> > Red3.txt
> >
> > and want them to be renamed
> >
> > Blue1.txt
> > Blue2.txt
> > Blue3.txt
> >
> > How would I go about doing this, I guess using a wildcard would be good
> > and
> > also my files always end in a number, just like the example above.
> >
> > Many thanks.
>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Hi You can use the free software and try it will do the renaming for all of
your files as you said.

http://www.myzips.com/download/Bulk-File-Renamer.phtml

It may help . . .

Thank you


"stuart" wrote:

> Is there away to automatically rename lots of files which are all in the same
> folder, so I don't have to do it manually? I tried using the RENAME in the
> Command Prompt but that would only work for one file.
>
> This is a basic example of what I need to do lots of times to many more
> files in many folders. I have these 3 files:
>
> Red1.txt
> Red2.txt
> Red3.txt
>
> and want them to be renamed
>
> Blue1.txt
> Blue2.txt
> Blue3.txt
>
> How would I go about doing this, I guess using a wildcard would be good and
> also my files always end in a number, just like the example above.
>
> Many thanks.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

What is written below may be more than what you want. It is written for
photo files in mind, but you can use it for any kind of file.







Using XP to organize your folders and your photos within folders



1. How to organize your photo folders so you can find them. (03-27-05)

2. How to make a collection of photos from different folders (or just within
a folder) so you can place the photos in the order you want and they will
stay in this order when you open the folder again for a slide show or copy
to a CD.



1. How to organize your photo folders.

You should make new folders on your drive for each group of pictures, or
make new folders under My Pictures folder, one folder for each group of
pictures. Either way will work. Now, how do you name the folders?

Remember that XP will list (or sort) folder names by numerical/alphabetical
order.

So the folder 2004_Vacation will be listed before the folder Vacation. You
can take advantage of this. What do you remember about a photo folder when
you search for it? A name or a date? It is a lot easier to find photo
folders when they have both a date and a name, but easier when the folders
are listed chronologically by date first instead of by name of event. So,
the listing of your folders should be: year, month (and day if you wish, but
be consistent, if you want the day enter the day for all folders) followed
by the event name. These should be separated by underline so it is easy to
read on your screen. So you should name folders something like this:

2003_12_25_Christmas

2004_12_25_Christmas

2003_04_07_Easter

2004_04_17_Easter

XP will list the folders in this order:

2003_04_07_Easter

2003_12_25_Christmas

2004_04_17_Easter

2004_12_25_Christmas



You can see what is happening. Your folders will be listed by year, month
and day and then the event name. This makes it easy to find them. You can
use some other system, but use one to list with a particular order other
than name of event alone. Otherwise you will have a messy listing of folder
names. If your folders are not properly organized, right click on a folder
name and click on rename on the opening menu. Then change the name using the
above system or a system you want.





2. How to organize a collection of photos in a folder, in the order you want
the photos to be displayed for a slide show. This will include renaming the
photos from the original name assigned by your camera.



Make a new folder on your hard drive. You can also make a new folder under
"My Pictures" if you prefer. Both will work.

Name the new folder something easy to remember and search for: year, month,
day, event, separated by underline. For example:

2004_09_16_Summer Vacations



Copy the photos you want to place in a particular order into this new
folder. You can copy photos to this new folder from a single folder (first
and simplest thing to do) or from any photo folder you have to make a new
collection. If you are making a collection, use a collection name, and the
date you are making it, something like:

2004_11_19_My Collection of Summer Photos

(this is a little more complicated but will also be explained below).



Once the photos are copied in this new folder, open the new folder. Hold the
Ctrl key down and press the letter A. This will select (highlight in blue)
all the files in the folder.

Right click on the first file (important to right click on the first file
because renaming will start from there).

Click on Rename on the opening menu.

Type in the name you want, to replace the current name of the first file.
Any system will work, such as year, month, day, event. For example type in:

2003_09_16 Virginia Beach Vacation (101).jpg

and press Enter.

XP will automatically rename all the files in this folder: 2003_09_16
Virginia Beach (101), (102), (103), etc. and they will open (sorted or
listed) in the order (101), (102), (103), etc. If you copy them to a CD,
this order will be maintained.



Two important things when renaming using the above method.

1. Look at the name of the above file, you must include a space between the
last character of the file name and (101)

2. When you rename, don't forget to add .jpg after (101). If you forget, XP
will warn you (window will open telling you the file type is being changed,
answer NO) and enter .jpg after this warning. If you don't, you will not be
able to open the file. If you still do not enter .jpg after the warning, don
't worry. Rename again and enter .jpg



You can rename any time and as many times as you want. You are not dependent
on the camera wizard to rename.



You can rename groups of files in a folder (in the example above, the date
can be 16, 17, 18, etc for each day of your vacation) just select the group
of files you want and right click on the first one in the group and rename
from there. For each group you select, just add (101) after the name you
want for the first file in the each group. So, you can rename as you want:

2003_09_16 Virginia Beach Vacation (101).jpg for all photos taken on
the 16

2003_09_17 Virginia Beach Vacation (101).jpg for all photos taken on
the 17

etc,

You simply select all the photos taken on the 16th and rename, etc.



You can do even better than this. Suppose you want a slide show and you want
the last three pictures taken on your vacation to be the first three or in
between some other photos, or re-order the photos in a folder in any way.
Easy to do. Open the folder in thumbnail view, use your mouse to place the
thumbnails in the order you want. Select all the photos and rename starting
from the first picture adding (101) to the name you want for the first
picture. The (101), (102), (103), etc will be added automatically in the
order you placed the thumbnails. They will stay in this order in your folder
and if you copy to a CD because XP lists (or sorts) by file name only on a
CD.

In this case, you can omit the day and the first file would be:

2003_09_Virginia Beach Vacation (101).jpg



If you copied many pictures from different folders in this new folder and
all you want is to order them in chronological order, moving thumbnails in
the correct order is tedious. Let XP do this for you. Change the View from
Thumbnails to Details. In the Details view, right click on the column header
"Name". This will open a list. Click on More at the bottom of the list. A
list will open, check the box "Date Picture Taken". This will add the
column Date Picture Taken in the Details view. Then you click on the column
header "Date Picture taken" and XP will now change the list of files (the
order of the listed files) from the name of the files (the default) to
listing files in chronological order. Now, change the View to Thumbnails and
they are in chronological order. Select them, rename them using the above
procedure and you are in business. There is also another way to do this.
When in Thumbnails view, click on View on the top bar, then Arrange Icons by
on the drop menu and then select Picture Taken On. The thumbnails are now in
chronological order.



Convenient if you want to make a slide show of pictures from different
folders. Just make a new folder, copy the photos you want in the new folder,
place the thumbnails in the order you want and rename.

You are not restricted to only one name (you use one name for one group of
picture, another for the next group, etc.) and you can control the order in
which each group will open, by placing a number up front of the file name
for each group. You may have photos of Christmas, Easter, New Year etc. and
of different years and you want them all together in the same folder for a
big slide show or save them on a CD to send to friends. Make a new folder,
copy them to the new folder. Then, place the thumbnails in the order you
want, select the first group, right click on the first thumbnail in the
group and rename:

1_2002 Easter (101).jpg

Then select the second group and rename

2_2002 Christmas (101).jpg

Placing 1_, 2_, etc in front will control the order of each group and (101)
controls the order within each group.

If you want to add another group later and you want the photos of this group
to be, say between 1_ and 2_, use 1a_ in front of the file name.

In the above example, after you make the new folder for your collection,
copy your Easter photos in it and rename them. Then copy your Christmas
photos in it and rename them. Then copy the next group in it and rename
them. Easier to do it this way than copying all of them and then renaming.
Also, after you copy a group, you can move the thumbnails to change the
order before renaming.



You may also want to add some more photos in a particular group at a later
time, say your Christmas group. No problem. Copy the files you want to add
in the folder, move the thumbnails in the group you want to add them to,
where you want them. Select all the thumbnails in the group, right click on
the first one and rename. When you rename, you must change the name in order
for rename to take place. Add something like XYZ after Christmas. Once
renaming is done, select the same files again and rename again. Remove the
XYZ and you will be back to the original name.



Note: There is a disadvantage to changing the original name of files. This
is why I recommend at the start to make a new folder and copy your original
files in the new folder before renaming. The disadvantage is this. Many have
the option of video out from the camera to display the pictures from the
memory card in your camera to a TV for a slide show. If you change the file
names and copy the files back to your memory card to display on your TV (or
even to just look at them on the LCD of the camera) your camera may not be
able to read the files. You can always rename, using the same format (8
characters) that your camera uses, but now you will have to rename each file
and this is tedious. So, be careful what you do with your original files.

There is a second disadvantage. The above naming system in an XP system. As
long as you are on XP everything will be displayed properly with this naming
system. However, if you go out of XP, the display order is unlikely to be
the same. Particularly true if you want to play a CD on your DVD player.
Your DVD player will read files on your CD differently and will want them in
the order 001,002,003, etc. rather than with the above system. It wants
files listed like:

Image 001.jpg

Image 002.jpg

Etc. to display them in the proper order. Since you now have your files in
the order you want in a folder, rename again if you want to copy them to a
CD and play this CD in a DVD player. Easy to do. Download the free software
from here:

www.irfanview.com

Once installed, open it and click on File and Batch conversion/renaming.

Select the files to rename, select the same folder for the new names.
Irfanview will not delete the file names you made with XP. It will add new
file names in the same folder (or you can make a new folder). You select a
single new name for all the files and 001, 002, 003, etc will be added
automatically. Open the folder and you will see the added files. You now
copy these files to a CD. Then you just delete these files. Select them,
hold the Shift key down and press the Delete key. They are removed and will
not go to the Recycle bin if you hold the Shift key down when pressing the
Delete key. You will encounter the same problem if you upload your photos
to a server on the Internet and you are using the XP naming system. The
order will not be displayed properly. You need to use the Image 001.jpg etc
system. So, again, once you have your photos in the order you want them and
you renamed using XP, simply use irfanview to change the name and upload
these files as when preparing them to copy to a CD for display via a DVD
player.



Note: Although I recommend making a new folder and copying your files there
before renaming, there is also another way to do this and you may prefer it
once you are comfortable with renaming. Here is how to do it.

Open the folder to see your files. Hold the Ctrl key down and press the
letter A to select (highlight in blue) all the files. Hold the Ctrl key down
and press the letter C. This makes a copy of all the files to your
clipboard. Hold the Ctrl key down and press the letter V. This copies
(pastes) all the files back in your folder. The file names will be the same,
but the words "Copy of" will be in front of the file names. You then rename
Copy of files.

This way your original files and renamed files are in the same folder.

This is also very useful when you want to edit photos with software. You
always edit "Copy of", never edit your original file.



All this renaming may seem a little complicated at first, but you can really
manipulate things very well by just sitting down and understanding the
system. With a little practice you can get what you want.

However, before renaming, make sure you make a new folder and copy some
photo files there so you can practice with no danger to your original files.
After you are comfortable with this, once you download the files from your
camera in a folder you can skip copying them into another folder and you
just rename the files.



"stuart" <stuart@discussions.microsoft.com> wrote in message
news:2BB2BDB3-1808-45AF-A3C7-A54029865AB4@microsoft.com...
> Is there away to automatically rename lots of files which are all in the
same
> folder, so I don't have to do it manually? I tried using the RENAME in the
> Command Prompt but that would only work for one file.
>
> This is a basic example of what I need to do lots of times to many more
> files in many folders. I have these 3 files:
>
> Red1.txt
> Red2.txt
> Red3.txt
>
> and want them to be renamed
>
> Blue1.txt
> Blue2.txt
> Blue3.txt
>
> How would I go about doing this, I guess using a wildcard would be good
and
> also my files always end in a number, just like the example above.
>
> Many thanks.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

Just include the (1) in the name of the first file.
The name of the first file should be:
Blue (1).text
Note that you must include a space between the last character of the file
name and (1)


"stuart" <stuart@discussions.microsoft.com> wrote in message
news:19D869E9-6BCD-49EB-8807-873597B1C0B4@microsoft.com...
> Thanks for the response but if I apply that method it keeps the number of
the
> one I rename and copies that with the renaming and includes a sequencal
> number in brackets. So for the example I would get:
>
> Blue1.txt
> Blue1 (2).txt
> Blue1 (3).txt
>
> Which is not what I want to have happen.
>
> Is it possible to create a batch command in Notepad so that I have a *.bat
> to double-click? I have heard of these but have no idea how to make one.
>
> Regards.
>
> "Jupiter Jones [MVP]" wrote:
>
> > Highlight them all
> > Then right click any of them.
> > Be sure they are all still highlighted and click Rename
> > Type the name you want and they will have the same name with sequential
> > numbers at the end.
> >
> > --
> > Jupiter Jones [MVP]
> > http://www3.telus.net/dandemar
> > In memory of our dear friend, MVP Alex Nichol
> > http://www.dts-l.org
> >
> >
> > "stuart" <stuart@discussions.microsoft.com> wrote in message
> > news:2BB2BDB3-1808-45AF-A3C7-A54029865AB4@microsoft.com...
> > > Is there away to automatically rename lots of files which are all in
the
> > > same
> > > folder, so I don't have to do it manually? I tried using the RENAME in
the
> > > Command Prompt but that would only work for one file.
> > >
> > > This is a basic example of what I need to do lots of times to many
more
> > > files in many folders. I have these 3 files:
> > >
> > > Red1.txt
> > > Red2.txt
> > > Red3.txt
> > >
> > > and want them to be renamed
> > >
> > > Blue1.txt
> > > Blue2.txt
> > > Blue3.txt
> > >
> > > How would I go about doing this, I guess using a wildcard would be
good
> > > and
> > > also my files always end in a number, just like the example above.
> > >
> > > Many thanks.
> >
> >
> >
 
G

Guest

Guest
The following script should work, Change all the "Red" with the first file name. Change all the "blue" to second name. copy this to a notepad document, and then save it as Rename.bat or Something.bat as long as the extension name is .bat and it will run and close once it is done...

Set Number=0
Set Numbre=0

:Label

Set Numbre=
Set /A Numbre=%Number+1%
Set Number=
Set Number=%Numbre%

IF NOT EXIST "Red%Number%.txt" Goto EXITLOOP
Rename "Red%Number%.txt" "Blue%Number%.txt"


GOTO Label

:EXITLOOP

If you have any trouble, figre out how to fix it yourself... as i will probably never run acrost this again...