Per suggestion I added /ad
to return only dirs, but continue to get prompted. The prompt suggests it wants to know whether to create a file or directory.
How do I automate the answer in a batch script?
This is the prompt:
Does \\server\tf\POL-5TVK5J1\Administrator\Desktop specify a file name or directory name on the target (F = file, D = directory)?
Here is my script:
@echo off
md "\\my server\tf\%computername%"
cd documents and settings
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and Settings\%%u\Desktop" "\\my server\tf\%computername%\%%u\Desktop" /D /R
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and Settings\%%u\Favorites" "\\my server\tf\%computername%\%%u\Favorites" /D /R
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and Settings\%%u\My Documents" "\\my server\tf\%computername%\%%u\My Documents" /D /R
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and Settings\%%u\Personal" "\\my server\tf\%computername%\%%u\Personal" /D /R
for /f %%u in ('dir /b /ad') do xcopy /s "c:\Documents and Settings\%%u\local settings\application data\Microsoft\Outlook" "\\my server\tf\%computername%\%%u\Outlook" /D /R
"\\my server\tf\%computername%\%%u\Desktop\"