Rename different files to one file name, one at a time

浪子不回头ぞ 提交于 2019-12-13 08:58:40

问题


i have files named..

82011.nsf
63113.nsf
55555.nsf

i must rename each file to single.nsf (for example ren 82011.nsf to single.nsf)

then use a program to act on that file (single.nsf)

then rename the next file (63113.nsf to single.nsf) then use a program to act on that file (single.nsf) etc

I want a batch file to do the nename, pause (so i can run the other program), then do the next rename until all nsf files are done.

how?


回答1:


for %i in (*.nsf) do ( 
  rename %i single.nsf 
  do_the_job 
  pause 
) 



回答2:


This should work:

for /f %%fname IN (‘dir /b *.nsf’) do call myprog %%a

[src]



来源:https://stackoverflow.com/questions/3642675/rename-different-files-to-one-file-name-one-at-a-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!