Solution
ok let's take a folder with a few files in it as an example.
If we start a Command Prompt (I recommend not doing this as Administrator just in case you goof, don't want to rename important files accidentally)
So typically it will drop you into C:\Users\YourUsername
You can then use the CD command to Change Directory to where you need for instance in our example the files reside in C:\Autocad
C:\Users\YourUsername>CD C:\Autocad
Then you can use dir to get a directory listing which will show you your files.
In our case it returns the three test files I created for this exercise.
1234-test1.dwg
1234-test2.dwg
1234-test3.dwg
C:\Autocad>ren 1234-test*.dwg project1-*.dwg
C:\Autocad>dir *.dwg
Volume in drive C has no label.
Volume...
If we start a Command Prompt (I recommend not doing this as Administrator just in case you goof, don't want to rename important files accidentally)
So typically it will drop you into C:\Users\YourUsername
You can then use the CD command to Change Directory to where you need for instance in our example the files reside in C:\Autocad
C:\Users\YourUsername>CD C:\Autocad
Then you can use dir to get a directory listing which will show you your files.
In our case it returns the three test files I created for this exercise.
1234-test1.dwg
1234-test2.dwg
1234-test3.dwg
C:\Autocad>ren 1234-test*.dwg project1-*.dwg
C:\Autocad>dir *.dwg
Volume in drive C has no label.
Volume...
- Thread Author
-
- #4
I can use both, do you know how to do it?Is it possible to rename only part of a filename when multiple files are selected in Windows Explorer?
I sometimes have hundreds of files to rename and I have to do them individually.
- Thread Author
-
- #5
I can use both, do you know how to do it, if so please post, thanks...If you are renaming hundreds of files you really should learn how to use a command prompt or powershell
- Thread Author
-
- #7
Hi JosephurIt really depends on the rename operation, can you give us an example of what you're renaming the files to/from?
Thanks for your help.
A typical filename is: 1234-ABC123-GA.dwg
I need to replace the first four figures.
Thanks again...
- Joined
- Aug 3, 2010
- Messages
- 1,289
ok let's take a folder with a few files in it as an example.
If we start a Command Prompt (I recommend not doing this as Administrator just in case you goof, don't want to rename important files accidentally)
So typically it will drop you into C:\Users\YourUsername
You can then use the CD command to Change Directory to where you need for instance in our example the files reside in C:\Autocad
C:\Users\YourUsername>CD C:\Autocad
Then you can use dir to get a directory listing which will show you your files.
In our case it returns the three test files I created for this exercise.
1234-test1.dwg
1234-test2.dwg
1234-test3.dwg
C:\Autocad>ren 1234-test*.dwg project1-*.dwg
C:\Autocad>dir *.dwg
Volume in drive C has no label.
Volume Serial Number is 6882-818E
Directory of C:\Autocad>
08/15/2016 06:41 PM 13 project1-1.dwg
08/15/2016 06:41 PM 13 project1-2.dwg
08/15/2016 06:41 PM 13 project1-3.dwg
3 File(s) 39 bytes
See how the 1234-test# was replaced with project1-#? This is just a simple example, you can do even more with different wildcards and scripting. If you get into PowerShell scripting you should easily be able to find PowerShell scripts that do an even more extensive job. You can probably also find a program that accepts regex patterns and renames files based on them.
If we start a Command Prompt (I recommend not doing this as Administrator just in case you goof, don't want to rename important files accidentally)
So typically it will drop you into C:\Users\YourUsername
You can then use the CD command to Change Directory to where you need for instance in our example the files reside in C:\Autocad
C:\Users\YourUsername>CD C:\Autocad
Then you can use dir to get a directory listing which will show you your files.
In our case it returns the three test files I created for this exercise.
1234-test1.dwg
1234-test2.dwg
1234-test3.dwg
C:\Autocad>ren 1234-test*.dwg project1-*.dwg
C:\Autocad>dir *.dwg
Volume in drive C has no label.
Volume Serial Number is 6882-818E
Directory of C:\Autocad>
08/15/2016 06:41 PM 13 project1-1.dwg
08/15/2016 06:41 PM 13 project1-2.dwg
08/15/2016 06:41 PM 13 project1-3.dwg
3 File(s) 39 bytes
See how the 1234-test# was replaced with project1-#? This is just a simple example, you can do even more with different wildcards and scripting. If you get into PowerShell scripting you should easily be able to find PowerShell scripts that do an even more extensive job. You can probably also find a program that accepts regex patterns and renames files based on them.
- Thread Author
-
- #9
ok let's take a folder with a few files in it as an example.
If we start a Command Prompt (I recommend not doing this as Administrator just in case you goof, don't want to rename important files accidentally)
So typically it will drop you into C:\Users\YourUsername
You can then use the CD command to Change Directory to where you need for instance in our example the files reside in C:\Autocad
C:\Users\YourUsername>CD C:\Autocad
Then you can use dir to get a directory listing which will show you your files.
In our case it returns the three test files I created for this exercise.
1234-test1.dwg
1234-test2.dwg
1234-test3.dwg
C:\Autocad>ren 1234-test*.dwg project1-*.dwg
C:\Autocad>dir *.dwg
Volume in drive C has no label.
Volume Serial Number is 6882-818E
Directory of C:\Autocad>
08/15/2016 06:41 PM 13 project1-1.dwg
08/15/2016 06:41 PM 13 project1-2.dwg
08/15/2016 06:41 PM 13 project1-3.dwg
3 File(s) 39 bytes
See how the 1234-test# was replaced with project1-#? This is just a simple example, you can do even more with different wildcards and scripting. If you get into PowerShell scripting you should easily be able to find PowerShell scripts that do an even more extensive job. You can probably also find a program that accepts regex patterns and renames files based on them.
- Thread Author
-
- #10
ok let's take a folder with a few files in it as an example.
If we start a Command Prompt (I recommend not doing this as Administrator just in case you goof, don't want to rename important files accidentally)
So typically it will drop you into C:\Users\YourUsername
You can then use the CD command to Change Directory to where you need for instance in our example the files reside in C:\Autocad
C:\Users\YourUsername>CD C:\Autocad
Then you can use dir to get a directory listing which will show you your files.
In our case it returns the three test files I created for this exercise.
1234-test1.dwg
1234-test2.dwg
1234-test3.dwg
C:\Autocad>ren 1234-test*.dwg project1-*.dwg
C:\Autocad>dir *.dwg
Volume in drive C has no label.
Volume Serial Number is 6882-818E
Directory of C:\Autocad>
08/15/2016 06:41 PM 13 project1-1.dwg
08/15/2016 06:41 PM 13 project1-2.dwg
08/15/2016 06:41 PM 13 project1-3.dwg
3 File(s) 39 bytes
See how the 1234-test# was replaced with project1-#? This is just a simple example, you can do even more with different wildcards and scripting. If you get into PowerShell scripting you should easily be able to find PowerShell scripts that do an even more extensive job. You can probably also find a program that accepts regex patterns and renames files based on them.
This works perfectly for what I need, it has saved me a lot of renaming work, thank you very much.
Do you know how to add four figures to an existing list of files?
- Joined
- Aug 3, 2010
- Messages
- 1,289
Do you know how to add four figures to an existing list of files?
Sure you could easily append things, let's say you have files test1.txt test2.txt and test3.txt in a folder. If you do "ren *.txt *-append.txt" they will now be named test1-append.txt, test2-append.txt, test3-append.txt
Similar threads
- Article
- Replies
- 4
- Views
- 44
- Article
- Replies
- 0
- Views
- 142
- Article
- Replies
- 2
- Views
- 85
- Replies
- 0
- Views
- 385
- Replies
- 2
- Views
- 57