Hi,I am trying to find a way to copy a file (*.pst) to somewhere else that I choose.
I am using the windows XP and running as *.bat AND *.cmd
It looks like this:
======================
@echo off
cd\
dir *.pst /s /b >pst.txt
======================
The output txt file looks like this:
======================
C:\Documents and Settings\Darrell\Local Settings\Application Data\Microsoft\Outlook\archive.pst
C:\Documents and Settings\Darrell\Local Settings\Application Data\Microsoft\Outlook\Outlook1.pst
======================
My problem is that obviously my output file cannot put Quotes around each location, or at least I don't know how to.
Also even if I go in and manually put quotes in place by editing my "copy batch file" it will only go as far as the 1st space and then creates an error.
My Copy Batch file looks like this:
======================
cd c:\
for /F %%a in (pst.txt) do xcopy "%%a" C:\backup /n
pause
======================
As you can see I have tried (in the above example) to wrap the %%a variable in quotes, that doesn't work either.
This is the error I get when it runs:
======================
Hi,I am trying to find a way to copy a file (*.pst) to somewhere else that I choose.
I am using the windows XP and running as *.bat AND *.cmd
It looks like this:
======================
@echo off
cd\
dir *.pst /s /b >pst.txt
======================
The output txt file looks like this:
======================
C:\Documents and Settings\Darrell\Local Settings\Application Data\Microsoft\Outlook\archive.pst
C:\Documents and Settings\Darrell\Local Settings\Application Data\Microsoft\Outlook\Outlook1.pst
======================
My problem is that obviously my output file cannot put Quotes around each location, or at least I don't know how to.
Also even if I go in and manually put quotes in place my "copy batch file" it will only go as far as the 1st space and the creates an error.
My Copy Batch file looks like this:
======================
cd c:\
for /F %%a in (pst.txt) do xcopy "%%a" C:\backup /n
pause
======================
As you can see I have tried (in the above example) to wrap the %%a variable in quotes, that doesn't work either.
This is the error I get when it runs:
======================
C:\Documents and Settings\Darrell\Desktop\get PST>cd c:\
C:\>for /F %a in (pst.txt) do xcopy "%a" C:\backup /n
C:\>xcopy "C:\Documents" C:\backup /n
File not found - Documents
0 File(s) copied
C:\>xcopy "C:\Documents" C:\backup /n
File not found - Documents
0 File(s) copied
C:\>pause
Press any key to continue . . .
==========================================
As you can see it only reads C:\Documents and then stops, Can anybody help with this? I hope I have given you enough info. Daz