我的目录中有文件夹名称,
packages\Example.1.0.0\Example.dll
packages\Example.2.0.0\Example.dll
packages\Example.3.0.0\Example.dll
如何复制文件
copy /Y "C:\Project\Example.dll"
"C:\Project\packages\Example.???.???.???\Example.dll"
答案 0 :(得分:0)
cd packages\Example.???.???.???
for %%* in (.) do set _currentfolder=%%~nx*
echo %_currentfolder%
copy /Y "C:\Project\Example.dll"
"C:\Project\packages\Example.%_currentfolder%\Example.dll"