-1

How would I rename a string in all file types not just one file type like .txt in Windows 10? Like for example if all my file names were named Bear-(number) but there are lots of different file types like .html, .php, .pdf, .css, & more how could I rename them all? I don't want to have to list all the file types in the folder... Your help would be appreciated.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65

1 Answers1

1

In windows 10, use command prompt by clicking on the windows button and typing in cmd

Switch to the directroy you have your files in - for example if they are in a directory called 'temp' enter cd temp.
Another example - if the files are in a nested folder like c:\temp\test - enter cd c:\temp\test

If they are on another drive, you will need to change to that drive by specifying the drive letter and then a colon... eg 'e:'

rename all files rename Bear-00001.* Bear-00002.*

The * at the end will preserve the file extension while changing the file name itself

hth

Jay
  • 9,561
  • 7
  • 51
  • 72
  • I'll try this hold on – Maria Parise Dec 09 '16 at 09:11
  • Just to add some information, if your files have different names, you can do : `rename *.* theNewFilesNames.*` – dtlvd Dec 09 '16 at 09:15
  • Nope didn't work... Got this `The system cannot find the file specified.` – Maria Parise Dec 09 '16 at 09:15
  • Can you let me know the filename of one of the files you want to rename and also the command you have typed into command prompt? – Jay Dec 09 '16 at 09:17
  • I see the problem. It's cause that's not the name of the file so it says that... I need it to rename all files with this word in it is what I meant. Like for example if there was 100+ files with 83974- in the file name – Maria Parise Dec 09 '16 at 09:19
  • Only thing is it didn't rename the files in the sub-folders and didn't rename the folders -_- – Maria Parise Dec 09 '16 at 09:25
  • Great, glad to have helped. This command can be made to work for sub-folders, but you need to know a bit about batch scripting for that... – Jay Dec 09 '16 at 09:29
  • See http://stackoverflow.com/a/15317773/685341 - it's a bit more advanced, but should work if you want to go down that route – Jay Dec 09 '16 at 09:30