Batch file to find file, and copy paste it to another location

天大地大妈咪最大 提交于 2019-12-11 18:23:20

问题


needing help with batch file. What I need: to find exact called file (for example from C: drive) and copy paste it to another location on same disk.

Example: I need to find file called "textfile.txt" from C: drive, and if it finds it, it will copy it, and paste to location C:\Program Files\Internet Explorer

So any simple way to do it?


回答1:


Give this a shot:

for /f "delims=" %%i in ('dir /s /b /a-d c:\textfile.txt') do copy /b "%%~i" "C:\Program Files\Internet Explorer"


来源:https://stackoverflow.com/questions/15669157/batch-file-to-find-file-and-copy-paste-it-to-another-location

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