Home
Certification Preparation
Microsoft
Windows 2000 Core
xcopy command
aueddonline
hey guys i'm trying to make a batch file that copies files from one folder to another but converts all the files to .txt from a .doc format while they are being copied.
is this possible using a batch file i've had a look at the xcopy command which is doing the main bit just need a parameter that is going to convert these suckers
Find more posts tagged with
Comments
undomiel
copy %1*.doc %2*.txt
aueddonline
would it look anything like this
copy C:\vpn-folder M:\ubuntu-xps-files %1*.doc %2*.txt
undomiel
Your batch file would be:
copy %1*.doc %2*.txt
Then you would execute it as:
mycustomcopy.bat C:\vpn-folder\ M:\ubuntu-xps-files\
Or if you need it to be more specific you would do:
mycustomcopy.bat C:\vpn-folder\NewFiles M:\ubuntu-xps-files\
Then all of your files in vpn-folder that begin with NewFiles and end in .doc would now be in the ubuntu-xps-files folder and ending in .txt.
aueddonline
hey thanks so much for the help man. I ended up with
a batch called covert.bat
copy %1*.doc %2*.txt
and another batch
cd C:\Users\user\Documents\sys-programs\development
convert.bat C:\vpn-folder\ M:\ubuntu-xps-files\
which is doing the job fine, how do I tell it to include all subdirectories
undomiel
Then just use xcopy /E %1.doc %2.txt
Call it the exact same way as you did. It will preserve the complete directory structure, even empty folders.
aueddonline
there's nothing quite like pressing a button and watching your computer do a pain in the arse job in a few seconds, I added some xcopy line in covert.bat so all the other files got copied,
thanks again undomiel
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of