S
S
Sergey Korenevsky2017-03-30 18:27:49
PowerShell
Sergey Korenevsky, 2017-03-30 18:27:49

How to copy XCOPY folders using relative path?

xcopy "_Install_Addons\" "%USERPROFILE%\AppData\Roaming\FreeCAD\Macro\Mod\" /Q /E

I insert the above line into the "copy.bat" batch file,
but the XCOPY command does not want to copy the contents of the folder to the Mod folder
. For me, it is important that the source path be relative, since it is not known in advance which path will be the source for the batch file and folder.
after the script is executed, the
Недопустимый путь
script "copy.bat" gives a message, the "_Install_Addons" folder is in one place
and the "Mod" folder already exists.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2017-03-30
@Dier_Sergio_Great

xcopy "%CD%\_Install_Addons" "%USERPROFILE%\AppData\Roaming\FreeCAD\Macro\Mod\_Install_Addons" /Q /E

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question