Page 1 of 1

robocopy from docx.txt

Posted: 2023-Sep-11, 6:45 pm
by h2kclan
hello can any one help me i need robocopy batch code

i use this everything seach tool then i use there command line
This code works I got docx.txt file from my hard drive with only docx extention with full address in one txt !

Code: Select all

ES.exe ext:docx -export-txt docx.txt
now i want robocopy to copy all those files from this docx txt to c:\win1
the docx,txt file will be in c:\robocopy\ folder
docx txt is attached


Re: robocopy from docx.txt

Posted: 2023-Sep-14, 3:22 pm
by h2kclan
no one known robocopy batch code??

Re: robocopy from docx.txt

Posted: 2023-Sep-18, 8:39 pm
by Shadow Thief
It's not that nobody knows (or cares), this site just doesn't get that much traffic. As of this comment, I'm literally the only member online.

It also doesn't help that this request actually has nothing to do with robocopy. Looking through tells you that there's no argument to do what you're asking for. What you actually needed to search was how to iterate over every line in a text file, which would have pointed you to (although it's hiding a bit since there are three functions of that command and only two help pages for it).

Eventually, that page should have helped you end up with the code

Code: Select all

for /f "delims=" %%A in (docx.txt) do robocopy "%%~dpA" "C:\robocopy" "%%~nxA"
No idea how well it's going to work with those files in your list that have Arabic names - good luck with that.