bat无法获取选中的文件
@echo off
rem 复制/拷贝多个指定文件到指定目录/文件夹
set #=Any question&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$% %z%
cd /d "%~dp0"
set "newfolder=D:\YANG"
if not exist "%newfolder%" (md "%newfolder%")
for %%a in (
"D:\xxx\文件1"
"D:\xxx\文件2"
"D:\xxx\文件3"
"D:\xxx\文件n"
) do copy "%%~a" "%newfolder%\"
echo;%#% +%$%%$% %z%
pause
以下代码仅复制aaa下所有文件和文件夹,但是不包括aaa文件夹本身。
@echo off
color 3f
xcopy /y /e /h d:\aaa %CD%\
pause