1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Windows批量复制文件copy命令bat批处理文件

Windows批量复制文件copy命令bat批处理文件

时间:2022-03-08 19:42:43

相关推荐

Windows批量复制文件copy命令bat批处理文件

如果需要复制很多文件,手动肯定是累死人的。

我们可以使用后缀为.bat的批处理文件,双击运行。

自己写一个.bat就好了

import jsonwith open('long_answer_example_subval.json', 'r') as input:a = json.load(input)#一个包含文件名字的字典o = open('cmd.txt','w')#包含命令的输出文件,后期需要把.txt后缀改成.batfor k, v in a.items():image_path = v["image_path"]image_path = image_path.replace('/', '\\')# windows下的路径格式cmd = 'copy D:\\Work\\content\\ST-VQA\\ST-VQA\\'+image_path+' D:\\Work\\lctog\\best_CAN\\example_pictures\\' + image_patho.write(cmd)o.write('\n')o.write('PAUSE')o.close()

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。