Answer the question
In order to leave comments, you need to log in
BAT, How to copy files with folders by full paths?
First: copy the folder with all files and folders "C:\Data" to the folder "C:\papka1"
Second: there is a list of files and folders with paths located in "C:\DATA":
Answer the question
In order to leave comments, you need to log in
Solution:
First:
xcopy "C:\Data" "C:\papka1" /e /h /k /q /r /c /y
Second:
@echo off
for /f "delims= eol=" %%f in ( 'type list.txt') do (
if exist "%%f\" (
robocopy "%%~dpf\" "C:\papka2%%~pf\" /xf * /e /njh /njs /v /log+ :log.txt
) else ( robocopy "%%~dpf\" "C:\papka2%%~pf\" /fp /njh /njs /ns /nc /v /log+:log.txt "%%~nxf" )
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question