bat file命令用于复制和重命名文件 [英] bat file command to copy and rename files

查看:1162
本文介绍了bat file命令用于复制和重命名文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些关于bat文件的帮助。我需要一个bat文件执行以下操作:



将文件从1个文件夹复制到另一个文件夹

复制后重命名文件 - 在文件夹中添加前缀文件名的开头

解决方案

zz.bat

 cd%1 
copy%2 %3 \\\ pfx%2





 zz sourcedirectory filename destinationdirectory 


要复制,请看这里:

http://stackoverflow.com/questions/986447/batch-file-to-copy-files-from-one-folder-to-another-folder [ ^ ]

要重命名,请查看此处:

http://stackoverflow.co m / questions / 10822683 / file-renaming-batch-script [ ^ ]

http://stackoverflow.com/questions/4436186/batch-script-to-rename-files-in-folder-argument [ ^ ]

HTTP://www.daniweb。 com / hardware-and-software / microsoft-windows / windows-nt-2000-xp / threads / 125561 / renaming-files-through-batch-scripts [ ^

I need some help regarding a bat file. I require a bat file doing the followings:

Copy file from 1 folder to another
Rename file after copying - add a prefix at the beginning of the filename

解决方案

zz.bat

cd %1
copy %2 %3\pfx%2



zz sourcedirectory filename destinationdirectory


To copy, have a look here:
http://stackoverflow.com/questions/986447/batch-file-to-copy-files-from-one-folder-to-another-folder[^]
To rename, have a look here:
http://stackoverflow.com/questions/10822683/file-renaming-batch-script[^]
http://stackoverflow.com/questions/4436186/batch-script-to-rename-files-in-folder-argument[^]
http://www.daniweb.com/hardware-and-software/microsoft-windows/windows-nt-2000-xp/threads/125561/renaming-files-through-batch-scripts[^]


这篇关于bat file命令用于复制和重命名文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆