复制到所有文件夹批处理文件? [英] Copy to all folders batch file?
本文介绍了复制到所有文件夹批处理文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要将档案(例如:a.jpg)复制到目录中的所有资料夹。
我需要类似
copy a.jpg * / a.jpg
$ b
(ps。i使用窗口)
for / ftokens = *% f in('dir。/ ad / b')do copya.jpg%f
记住在放入批处理文件
时使用%% f而不是%
i want to copy a file (example: a.jpg) to all folders in a directory.
i need something like
copy a.jpg */a.jpg
do you have a batch file that does something like that?
(ps. i use windows)
解决方案
use the for command
for /f "tokens=*" %f in ('dir . /ad/b') do copy "a.jpg" "%f"
Remember to use %%f instead of % when placing in a batch file
这篇关于复制到所有文件夹批处理文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文