1

How to add a String (100000) to multiple file names through Ms-dos command.

I have multiple files (customer,address,postal_area..etc) stored in single folder. I want to add 100000 string to these file names like below..

100000_customer.txt
100000_address.txt
100000_posrtal_area.txt

how to do this one with single dos command? Is it possible?

Many thhanks for your help.

Sunitha.

RST
  • 3,899
  • 2
  • 20
  • 33
Sunitha
  • 135
  • 1
  • 2
  • 12
  • 2
    Hope this will help lot. http://www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/ – HackerGK Oct 28 '14 at 07:05
  • possible duplicate of [Rename multiple files in cmd](http://stackoverflow.com/questions/17271586/rename-multiple-files-in-cmd) – Jens Oct 28 '14 at 07:05
  • There is no MS-DOS anymore. I guess you really mean the Windows command line. –  Dec 04 '14 at 19:22

2 Answers2

2

Try this command

ren "*.txt" "100000_*.txt"
Monacraft
  • 6,510
  • 2
  • 17
  • 29
RST
  • 3,899
  • 2
  • 20
  • 33
  • 3
    This command will replace the starting characters in file name like '100000_r.txt', '100000__area.txt'. Is there a way not to do that? – user2723039 May 03 '16 at 20:19
-1

I successfully rename my images files names with *.1

See my command below: ren "*.1" "*.jpg"

all the files chnaged to .jpg file extension.