robocopy from docx.txt

Microsoft Windows
Post Reply
h2kclan
Posts: 2
Joined: 2023-Sep-11, 6:40 pm

robocopy from docx.txt

Post 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

thanks
Attachments
docx.zip
(2.86 KiB) Downloaded 137 times
h2kclan
Posts: 2
Joined: 2023-Sep-11, 6:40 pm

Re: robocopy from docx.txt

Post by h2kclan »

no one known robocopy batch code??
Shadow Thief
Posts: 12
Joined: 2021-Aug-03, 1:45 am

Re: robocopy from docx.txt

Post 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 https://ss64.com/nt/robocopy.html 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 https://ss64.com/nt/for_f.html (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.
Post Reply