Guest Magg Posted August 13, 2007 Posted August 13, 2007 I am trying to use the REN command in the command prompt to rename a batch of FOLDERS in one directory. The names are all 11 digits, long mostly letters, with a number as the last character. At the moment they all have a 5 at the end of the name, but I want to be able to change this last character to any other number in one go. I can do this for a group of txt FILES named 1115,2225,3335,4445..etc by entering.. Ren U:\folder1\folder2\???5.txt ???6.txt Which will change the file names to 1116,2226,3336,4446...etc I want to be able to do the same for the folders however if i try and use the wildcard characters when changing the name of folders I get an error message saying "The syntax of the command is incorrect" This is an example of what i'm trying Ren U:\Folder1\???5 ???6 Does anyone know why this multiple folder rename won't work like the file rename does and if it's possible to do what I want using RENAME command. Any help greatly appreciated, though please dont point me to any third party software, I am at work and so cannot download any such software which i realise would be the easy option.
Guest Merlin Posted August 13, 2007 Posted August 13, 2007 Re: REN command in CMD for folders "Magg" <Magg@discussions.microsoft.com> wrote in message news:060323D4-826A-434C-AE30-0D4CFD6FBCA7@microsoft.com... >I am trying to use the REN command in the command prompt to rename a batch >of > FOLDERS in one directory. The names are all 11 digits, long mostly > letters, > with a number as the last character. At the moment they all have a 5 at > the > end of the name, but I want to be able to change this last character to > any > other number in one go. > I can do this for a group of txt FILES named 1115,2225,3335,4445..etc by > entering.. > Ren U:\folder1\folder2\???5.txt ???6.txt > Which will change the file names to 1116,2226,3336,4446...etc > > I want to be able to do the same for the folders however if i try and use > the wildcard characters when changing the name of folders I get an error > message saying "The syntax of the command is incorrect" > > This is an example of what i'm trying > Ren U:\Folder1\???5 ???6 > > Does anyone know why this multiple folder rename won't work like the file > rename does and if it's possible to do what I want using RENAME command. > Any help greatly appreciated, though please dont point me to any third > party > software, I am at work and so cannot download any such software which i > realise would be the easy option. the Ren or RENAME command is for renaming files not folders.
Guest Magg Posted August 13, 2007 Posted August 13, 2007 Re: REN command in CMD for folders "Merlin" wrote: > "Magg" <Magg@discussions.microsoft.com> wrote in message > news:060323D4-826A-434C-AE30-0D4CFD6FBCA7@microsoft.com... > >I am trying to use the REN command in the command prompt to rename a batch > >of > > FOLDERS in one directory. The names are all 11 digits, long mostly > > letters, > > with a number as the last character. At the moment they all have a 5 at > > the > > end of the name, but I want to be able to change this last character to > > any > > other number in one go. > > I can do this for a group of txt FILES named 1115,2225,3335,4445..etc by > > entering.. > > Ren U:\folder1\folder2\???5.txt ???6.txt > > Which will change the file names to 1116,2226,3336,4446...etc > > > > I want to be able to do the same for the folders however if i try and use > > the wildcard characters when changing the name of folders I get an error > > message saying "The syntax of the command is incorrect" > > > > This is an example of what i'm trying > > Ren U:\Folder1\???5 ???6 > > > > Does anyone know why this multiple folder rename won't work like the file > > rename does and if it's possible to do what I want using RENAME command. > > Any help greatly appreciated, though please dont point me to any third > > party > > software, I am at work and so cannot download any such software which i > > realise would be the easy option. > > > the Ren or RENAME command is for renaming files not folders. > > > Yes I realise that, but it is possible to use it to rename folders, e.g. Ren U:\folder1\1111 2222 Will change the folder name 1111 to 2222 You just dont seem to be able to use specail characters such as ? in the syntax and I was asking if anyone knows if there's a way around it.
Guest Merlin Posted August 13, 2007 Posted August 13, 2007 Re: REN command in CMD for folders "Magg" <Magg@discussions.microsoft.com> wrote in message news:1182EC0F-F04A-4CD7-A01C-2458DBA60C52@microsoft.com... > > > "Merlin" wrote: > >> "Magg" <Magg@discussions.microsoft.com> wrote in message >> news:060323D4-826A-434C-AE30-0D4CFD6FBCA7@microsoft.com... >> >I am trying to use the REN command in the command prompt to rename a >> >batch >> >of >> > FOLDERS in one directory. The names are all 11 digits, long mostly >> > letters, >> > with a number as the last character. At the moment they all have a 5 at >> > the >> > end of the name, but I want to be able to change this last character >> > to >> > any >> > other number in one go. >> > I can do this for a group of txt FILES named 1115,2225,3335,4445..etc >> > by >> > entering.. >> > Ren U:\folder1\folder2\???5.txt ???6.txt >> > Which will change the file names to 1116,2226,3336,4446...etc >> > >> > I want to be able to do the same for the folders however if i try and >> > use >> > the wildcard characters when changing the name of folders I get an >> > error >> > message saying "The syntax of the command is incorrect" >> > >> > This is an example of what i'm trying >> > Ren U:\Folder1\???5 ???6 >> > >> > Does anyone know why this multiple folder rename won't work like the >> > file >> > rename does and if it's possible to do what I want using RENAME >> > command. >> > Any help greatly appreciated, though please dont point me to any third >> > party >> > software, I am at work and so cannot download any such software which i >> > realise would be the easy option. >> >> >> the Ren or RENAME command is for renaming files not folders. >> >> >> Yes I realise that, but it is possible to use it to rename folders, > e.g. Ren U:\folder1\1111 2222 > Will change the folder name 1111 to 2222 > You just dont seem to be able to use specail characters such as ? in the > syntax and I was asking if anyone knows if there's a way around it. Have you tried using Ren U\Folder1\*5 *6 ?
Guest Magg Posted August 13, 2007 Posted August 13, 2007 Re: REN command in CMD for folders > Have you tried using Ren U\Folder1\*5 *6 ? > > > Ooops I just clicked on the yes for "did this answer your question" sorry, it was helpful but it doesn't seem to work. Neither does any combination of asteriks and question marks that might logically work. Thanks for the help looks like i'll just have to change them manually
Guest Pegasus \(MVP\) Posted August 14, 2007 Posted August 14, 2007 Re: REN command in CMD for folders "Magg" <Magg@discussions.microsoft.com> wrote in message news:060323D4-826A-434C-AE30-0D4CFD6FBCA7@microsoft.com... >I am trying to use the REN command in the command prompt to rename a batch >of > FOLDERS in one directory. The names are all 11 digits, long mostly > letters, > with a number as the last character. At the moment they all have a 5 at > the > end of the name, but I want to be able to change this last character to > any > other number in one go. > I can do this for a group of txt FILES named 1115,2225,3335,4445..etc by > entering.. > Ren U:\folder1\folder2\???5.txt ???6.txt > Which will change the file names to 1116,2226,3336,4446...etc > > I want to be able to do the same for the folders however if i try and use > the wildcard characters when changing the name of folders I get an error > message saying "The syntax of the command is incorrect" > > This is an example of what i'm trying > Ren U:\Folder1\???5 ???6 > > Does anyone know why this multiple folder rename won't work like the file > rename does and if it's possible to do what I want using RENAME command. > Any help greatly appreciated, though please dont point me to any third > party > software, I am at work and so cannot download any such software which i > realise would be the easy option. You can do this sort of thing with a batch file. Post again if you're still interested.
Recommended Posts