Hello. You need a bat - nickname to set the title. It should rename files located in the Network folder. Did this:

小:\Documents and Settings\Admin>md "小:\Documents and Settings\Network\New" 小:\Documents and Settings\Admin>copy con "小:\Documents and Settings\Network\New\1.doc" 小:\Documents and Settings\Admin>copy con "小:\Documents and Settings\Network\New\2.doc" 小:\Documents and Settings\Admin>copy con "小:\Documents and Settings\Network\New\3.doc" 小:\Documents and Settings\Admin>copy con txt_maker.bat @echo off for /r "小:\Documents and Settings\Network" %%f in (*.doc?) do ren "%%f" "%%f.txt" ^Z 
  • one
    ren C: \ SomePath \ *. doc C: \ SomePath \ *. txt does not suit you? - Vladimir Martyanov
  • And why do you write copy con ? What is the logic? - VladD
  • @ VladimirMartyanov, need using for - Muscled Boy
  • @VladD, one of the ways to create a file, and why not? - Muscled Boy
  • one
    @MuscledBoy: Where did the requirement to make through for come from? Single ren perfectly copes. - VladD

1 answer 1

 for /R %%x in (*.doc) do ren "%%x" *.txt 

Running a bat file with such contents in a directory recursively renames doc to txt in that directory and below. If only needed in a separate directory, this is done via

 ren C:\SomePath\*.doc C:\SomePath\*.txt 
  • thanks helped. Can I ask you for help? It is necessary that you correct me if I understood something wrong. - Muscled Boy
  • Why when we create a parameter do not write quotes, and then put in the list of commands? - Muscled Boy
  • @MuscledBoy do not know, such is the syntax, probably. - Vladimir Martyanov