|
#1
|
|||
|
|||
|
Hello, All!
I could do this with Unix so easily but I cannot think how to rename all (or at least a good number) of the items in a folder with Windows. A typical example would be the automatic picture numbers from a digital camera, like DSC00831. I would like to simply type the names, line by line with a word processor, and then replace the picture numbers. Has anyone any easy suggestions or is my knowledge of Windows even more meager than I suspect? TIA James Silverton Potomac, Maryland, USA |
|
#2
|
|||
|
|||
|
You open Explorer, select and highlight the file to be renamed, hit F2, type
the new name in the box. Repeat for each file to be renamed. "James Silverton" <not.jim.silverton@comcast.not> wrote in message news:%23ARE19LDGHA.3784@TK2MSFTNGP15.phx.gbl... > Hello, All! > > I could do this with Unix so easily but I cannot think how to rename all > (or at least a good number) of the items in a folder with Windows. A > typical example would be the automatic picture numbers from a digital > camera, like DSC00831. I would like to simply type the names, line by line > with a word processor, and then replace the picture numbers. Has anyone > any easy suggestions or is my knowledge of Windows even more meager than I > suspect? > > TIA > > James Silverton > Potomac, Maryland, USA |
|
#3
|
|||
|
|||
|
Hi
Here's how http://www.microsoft.com/windowsxp/u...amephotos.mspx Regards John "James Silverton" <not.jim.silverton@comcast.not> wrote in message news:%23ARE19LDGHA.3784@TK2MSFTNGP15.phx.gbl... > Hello, All! > > I could do this with Unix so easily but I cannot think how to rename all > (or at least a good number) of the items in a folder with Windows. A > typical example would be the automatic picture numbers from a digital > camera, like DSC00831. I would like to simply type the names, line by line > with a word processor, and then replace the picture numbers. Has anyone > any easy suggestions or is my knowledge of Windows even more meager than I > suspect? > > TIA > > James Silverton > Potomac, Maryland, USA |
|
#4
|
|||
|
|||
|
Jerry wrote on Thu, 29 Dec 2005 13:37:16 -0800:
>>You open Explorer, select and highlight the file to be >>renamed, hit F2, type >>>the new name in the box. Repeat for each file to be renamed. Thanks but that's the tedious process I was trying to avoid:-) "James Silverton" <not.jim.silverton@comcast.not> wrote in message news:%23ARE19LDGHA.3784@TK2MSFTNGP15.phx.gbl... > Hello, All! > > I could do this with Unix so easily but I cannot think how to > rename all (or at least a good number) of the items in a > folder with Windows. J> "James Silverton" <not.jim.silverton@comcast.not> wrote in J> message news:%23ARE19LDGHA.3784@TK2MSFTNGP15.phx.gbl... James Silverton. |
|
#5
|
|||
|
|||
|
John wrote on Thu, 29 Dec 2005 21:40:15 -0000:
J> http://www.microsoft.com/windowsxp/u...amephotos.mspx J> Regards J> John J> "James Silverton" <not.jim.silverton@comcast.not> wrote in J> message news:%23ARE19LDGHA.3784@TK2MSFTNGP15.phx.gbl... ??>> Hello, All! ??>> ??>> I could do this with Unix so easily but I cannot think how ??>> to rename all (or at least a good number) of the items in ??>> a folder with Windows. Again, I'm afraid I also knew about that useful technique but what I would like to do is use quite different descriptive names for each file. I know Explorer will do it but I find doing the names one by one to be tedious. Just to avoid misunderstanding, I might have:_ DSN00675 DSN00677 DSN00684............. and I would like to replace them by say: On the swings How did the dog get in? Going home.......... Typing the list of names with even someting like Word Pad is not particularly time consuming but I can't think how to use the list in the folder directory. If only the directory were an Excel file! James Silverton. |
|
#6
|
|||
|
|||
|
dir /a /b "c:\somewhere" >> "%userprofile%\desktop\filelist.txt"
ren "filename1" "filename2" -- -------------------------------------------------------------------------------------------------- Goodbye Web Diary http://margokingston.typepad.com/har....html#comments ================================================= "James Silverton" <not.jim.silverton@comcast.not> wrote in message news:%23nINNKMDGHA.2040@TK2MSFTNGP14.phx.gbl... > John wrote on Thu, 29 Dec 2005 21:40:15 -0000: > > J> > http://www.microsoft.com/windowsxp/u...amephotos.mspx > > J> Regards > > J> John > > J> "James Silverton" <not.jim.silverton@comcast.not> wrote in > J> message news:%23ARE19LDGHA.3784@TK2MSFTNGP15.phx.gbl... > ??>> Hello, All! > ??>> > ??>> I could do this with Unix so easily but I cannot think how > ??>> to rename all (or at least a good number) of the items in > ??>> a folder with Windows. > > Again, I'm afraid I also knew about that useful technique but > what I would like to do is use quite different descriptive names > for each file. I know Explorer will do it but I find doing the > names one by one to be tedious. Just to avoid misunderstanding, > I might have:_ > DSN00675 > DSN00677 > DSN00684............. > and I would like to replace them by say: > On the swings > How did the dog get in? > Going home.......... > > Typing the list of names with even someting like Word Pad is not > particularly time consuming but I can't think how to use the > list in the folder directory. If only the directory were an > Excel file! > > James Silverton. > |
|
#7
|
|||
|
|||
|
David wrote on Fri, 30 Dec 2005 09:08:05 +1100:
dir /a /b "c:\somewhere" >> "%userprofile%\desktop\filelist.txt" ren "filename1" "filename2" DC> ren "filename1" "filename2" DC> -- DC> ----------------------------------------------------------- DC> Goodbye Web Diary DC> http://margokingston.typepad.com/har....html#comments DC> ================================================= DC> "James Silverton" <not.jim.silverton@comcast.not> wrote in DC> message news:%23nINNKMDGHA.2040@TK2MSFTNGP14.phx.gbl... ??>> ??>> Typing the list of names with even something like Word Pad ??>> is not particularly time consuming but I can't think how ??>> to use the list in the folder directory. Thank you David! Now that looks good! It could be done by setting up a Script file I guess but I tend to forget about those. James Silverton. |
|
#8
|
|||
|
|||
|
In Word using Find and Replace it is a cinch. ^p is a paragraph in word. So in File list text
Find ^p Replace " "^pren " Prefixes all but the first line with ren " and adds " " to the end of the line (check the last line for a spurious entry) so all you do is go to end of each line and type newfilename" Name the new file something.bat. Test it on a copy of your data. -- -------------------------------------------------------------------------------------------------- Goodbye Web Diary http://margokingston.typepad.com/har....html#comments ================================================= "James Silverton" <not.jim.silverton@comcast.not> wrote in message news:uqbSIZMDGHA.2320@TK2MSFTNGP12.phx.gbl... > David wrote on Fri, 30 Dec 2005 09:08:05 +1100: > > dir /a /b "c:\somewhere" >> > "%userprofile%\desktop\filelist.txt" > > ren "filename1" "filename2" > > > DC> ren "filename1" "filename2" > > DC> -- > DC> ----------------------------------------------------------- > DC> Goodbye Web Diary > DC> > http://margokingston.typepad.com/har....html#comments > DC> ================================================= > DC> "James Silverton" <not.jim.silverton@comcast.not> wrote in > DC> message news:%23nINNKMDGHA.2040@TK2MSFTNGP14.phx.gbl... > ??>> > ??>> Typing the list of names with even something like Word Pad > ??>> is not particularly time consuming but I can't think how > ??>> to use the list in the folder directory. > > Thank you David! > > Now that looks good! It could be done by setting up a Script > file I guess but I tend to forget about those. > > > James Silverton. > |
|
#9
|
|||
|
|||
|
David wrote on Fri, 30 Dec 2005 09:29:36 +1100:
DC> Find DC> ^p DC> Replace DC> " "^pren " DC> Prefixes all but the first line with DC> ren " DC> and adds DC> " " DC> to the end of the line (check the last line for a spurious DC> entry) DC> so all you do is go to end of each line and type DC> newfilename" DC> Name the new file something.bat. Test it on a copy of your ??>> Thank you David! ??>> ??>> Now that looks good! It could be done by setting up a ??>> Script file I guess but I tend to forget about those. ??>> ??>> James Silverton. ??>> Again, many thanks and I'll give it a try very soon! James Silverton. |
|
#10
|
|||
|
|||
|
"James Silverton" <not.jim.silverton@comcast.not> wrote in message news:%23nINNKMDGHA.2040@TK2MSFTNGP14.phx.gbl... > John wrote on Thu, 29 Dec 2005 21:40:15 -0000: > > J> > http://www.microsoft.com/windowsxp/u...amephotos.mspx > > J> Regards > > J> John > > J> "James Silverton" <not.jim.silverton@comcast.not> wrote in > J> message news:%23ARE19LDGHA.3784@TK2MSFTNGP15.phx.gbl... > ??>> Hello, All! > ??>> > ??>> I could do this with Unix so easily but I cannot think how > ??>> to rename all (or at least a good number) of the items in > ??>> a folder with Windows. > > Again, I'm afraid I also knew about that useful technique but what I would > like to do is use quite different descriptive names for each file. I know > Explorer will do it but I find doing the names one by one to be tedious. > Just to avoid misunderstanding, I might have:_ > DSN00675 > DSN00677 > DSN00684............. > and I would like to replace them by say: > On the swings > How did the dog get in? > Going home.......... > > Typing the list of names with even someting like Word Pad is not > particularly time consuming but I can't think how to use the list in the > folder directory. If only the directory were an Excel file! > > James Silverton. Hmm..so he wants an excel file, does he? Well, before the excel file generation path, try this batch: [1]@echo off [2]echo @echo off>jsg.bat [3]for /f "DELIMS=" %%i in ( 'dir/S/b/a-d "r:\directory\*.*" ' ) do echo ren 2^>nul "%%~dpnxi" "%%~nxi">>jsg.bat Each line begins [number]. Lines will be wrapped in transmission and need to be rejoined. The [number] at the beginning of each line needs to be removed. This batch processes r:\directory, finding all files (*.*) in the directory-tree (remove the "/S" switch from after the DIR to scan the target directory only) and creating a file (jsg.bat) which has the structure @echo off ren 2>nul "r:\directory\file1.ext" "file1.ext" ren 2>nul "r:\directory\file2.ext" "file2.ext" ren 2>nul "r:\directory\file3.ext" "file3.ext" .... which can then be text-edited (using EDIT or Notepad, not wordpad as wordpad tends to save unwanted formatting data...) to create your new filenames. The "2>nul" suppresses any STDERR messages that may be created when the batch is run. Remove the 2^>nul from [3] if you want to see these messages (which can be useful if the filenames contain some characters to which DOS is sensitive - like % or & for instance [best to avoid these characters]) Now if you really want it in Excel format, change the batch to: [1]@echo off [2]if exist jsg.csv del jsg.csv [3]for /f "DELIMS=" %%i in ( 'dir/S/b/a-d "r:\directory\*.*" ' ) do echo "%%~dpnxi", "%%~nxi">>jsg.csv which will create jsg.csv with two quote-delimited, comma-separated columns. Leave out the ,"%%~nxi" part to create one column if that's what you want. HTH ....Bill |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Keeping backup of my pictures in my order | Gladys222 | Windows XP Photos | 10 | 01-05-2006 07:08 AM |
| Re: where is ythe toggle for mainataing settings between sessions? | craig | Windows XP Customize | 0 | 01-05-2006 06:33 AM |
| One-way connection: networked XP/2000 PC's | Cheryl | Windows XP Network Web | 22 | 01-05-2006 04:11 AM |
| Can't Ping My Own IP Address - Part 2 | Don | Windows XP Network Web | 3 | 01-05-2006 04:10 AM |
| Re: Folder within My Pictures | Scottish Lass 3 | Windows XP Basics | 1 | 01-05-2006 02:05 AM |