none
making multiple copies of a file RRS feed

الإجابات

  • If you're just trying to append a sequential number to the end of the file name you could use this :

    for /L %%i IN (1,1,10) do copy text.txt text%%i.txt

    which in this example will copy text.txt to text1.txt, text2.txt etc through to text10.txt.

    The bit in brackets controls the start value, the increment and the end value, and then you simply adjust the bit at the end to relate to the filename you're renaming.

    • تم الاقتراح كإجابة بواسطة FZB 28/رجب/1435 09:08 م
    • تم وضع علامة كإجابة بواسطة arnavsharmaModerator 06/شعبان/1435 09:53 ص
    28/رجب/1435 08:53 م

جميع الردود

  • If you're just trying to append a sequential number to the end of the file name you could use this :

    for /L %%i IN (1,1,10) do copy text.txt text%%i.txt

    which in this example will copy text.txt to text1.txt, text2.txt etc through to text10.txt.

    The bit in brackets controls the start value, the increment and the end value, and then you simply adjust the bit at the end to relate to the filename you're renaming.

    • تم الاقتراح كإجابة بواسطة FZB 28/رجب/1435 09:08 م
    • تم وضع علامة كإجابة بواسطة arnavsharmaModerator 06/شعبان/1435 09:53 ص
    28/رجب/1435 08:53 م
  • if you run Keith's command directly from the command line, only use one %, if you save it inside a batch file and run that, you need the %%
    28/رجب/1435 09:09 م
  • Thank you, worked perfectly on Windows 7 with one "%"
    19/شوال/1440 05:34 م
  • Thanks worked great.  If I wanted 1 to 1000 starting at 001, 002, etc.... can the %i value be formatted?  I suppose I could go from 1000 to 1999 if lexicographic order was what I was after.  I know ordering in Winows can be controlled  (numerical vs. literal) but that doesn't always help if opening the folder from another application.  Thanks again!
    19/شوال/1440 05:50 م