Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Batch Folder Renaming


  • Please log in to reply
5 replies to this topic

#1 LouieChuckyMerry

LouieChuckyMerry

  • Members
  • 151 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:50 PM

Posted 09 May 2010 - 07:20 AM

Hello, and many thanks to anyone willing to help; I appreciate it. I have thousands of folders containing MP3s, all of which are named "AlbumName{xxxx}" where "xxxx" is the album's release year. An epiphany later, I'm wanting to rename all of these folders to "{xxxx}AlbumName" so that they'll be sorted by release year. I've found--and used--many utilities for batch renaming files and folders, but I can't find any that will allow me to MOVE a specific string of characters (in this case the last 6 characters of every folder name) to a different position in the folder name (in this case to the first 6 characters of every folder name). I'd reckon that it's possible to write a batch file for this, but my computer skills aren't quite that advanced. Does anybody know of an, preferably freeware, application that would let me move the last 6 characters of a batch of folder names to the first 6 characters in the same folder names? Thanks again for any help.

Edited by LouieChuckyMerry, 09 May 2010 - 07:23 AM.


BC AdBot (Login to Remove)

 


#2 PropagandaPanda

PropagandaPanda


  • Malware Response Team
  • 10,433 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:50 PM

Posted 09 May 2010 - 10:57 AM

Hello LouieChuckyMerry.

Batch files are really tiresome when it comes to string handling. Usually serious batch programs will need a Stream Editor. I think this particular job can be done, however.

Before I can help you I'll need some clarifications. Are all the folders named "AlbumName{xxxx}" located directly under one folder, as in the example below where they would be all under the "Music" folder?
c:\Music\AlbumA{2004}
c:\Music\AlbumB{2004}
c:\Music\AlbumD{2009}
c:\Music\AlbumY{1999}

Or is it another case where the folders you want to rename are under different subfolders like such:
c:\Music\Clasical\AlbumA{2004}
c:\Music\Clasical\AlbumB{2004}
c:\Music\Rock\AlbumD{2009}
c:\Music\Rock\AlbumY{1999}

Also please tell me what version of Windows you are running.

With Regards,
The Panda

#3 PropagandaPanda

PropagandaPanda


  • Malware Response Team
  • 10,433 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:50 PM

Posted 09 May 2010 - 11:26 AM

Also, if you want to look into string manipulation in batch files, have a look at the SET /? .

The Panda

#4 666philb

666philb

  • Members
  • 130 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:uk
  • Local time:09:50 PM

Posted 09 May 2010 - 01:15 PM

there's another post about batch renaming in this forum, and whilst looking for a solution found this progam

http://www.bulkrenameutility.co.uk/Main_Intro.php

just tested it to see if it would do what you wanted and it can, i just moved the last four characters of the name to the start ! easily:)

edit........the option is in section 6 of the gui 'move/copy'

Edited by 666philb, 09 May 2010 - 01:42 PM.


#5 LouieChuckyMerry

LouieChuckyMerry
  • Topic Starter

  • Members
  • 151 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:50 PM

Posted 09 May 2010 - 08:31 PM

666philb: thank you very much for pointing out what I missed. Bulk Rename Utility was the first app I checked out (I love Cnet/download.com), but in my haste for an easy solution I missed . . . an easy solution :thumbsup: . The user interface is a bit intimidating but the program worked perfectly with your guidance, and next time I'll be more patient before pestering the kind folk here.


Propaganda Panda: thank you very much for your willingness to help. Having recently written my first (very very simple) batch file--a cmd prompt to remove the write protection from the first usb external drive (volume 2) plugged into my Windows 7 laptop; for some reason any external drive I plug into my laptop becomes write protected within minutes, but only on my laptop (very frustrating, but a different issue)--I looked at the SET \?. I get the gist but would need a tutorial to utilize it. My music is organized by

c:\Music\ArtistA\AlbumU{2010}
c:\Music\ArtistA\AlbumV{2004}
c:\Music\ArtistB\AlbumW{2009}
c:\Music\ArtistC\AlbumX{1999}
c:\Music\ArtistD\AlbumY{1968}
c:\Music\ArtistD\AlbumZ{1971}

but the Bulk Rename Utility allows for the selection of subfolders so that was no problem. Heck, it looked to me as if Bulk Rename Utility could manipulate most any part of a directory. Anyway, thanks again for your time, I really appreciate it.

#6 PropagandaPanda

PropagandaPanda


  • Malware Response Team
  • 10,433 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:50 PM

Posted 10 May 2010 - 04:27 PM

Glad you got it solved :thumbsup: .

The Panda




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users