![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | copy folder to a network share??? Hopefully someone can help me see what is going on with a little .cmd file that I wanted to copy data from WindowsXP PCs to a network share. First, the command : \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My Documents" /COPYALL /v /NP /R:2 /w:3 And the SET info from one of the PCs: HOMEDRIVE=Z: HOMEPATH=\ HOMESHARE=\\Dc1\Users\jwayne LOGONSERVER=\\DC1 USERNAME=jwayne USERPROFILE=C:\Documents and Settings\jwayne If this command is run from any of the PCs for the first time it will create a folder in the %HOMESHARE% folder on the network, but instead of calling it "My Documents" as the command says, it calls it "teacher's Documents". I have no idea why. And it copies no data into the folder on the network, but I am unsure whether that is correct or not, because I do not know where this "teacher's documents" folder is. Any idea where I went wrong? thanks |
My System Specs![]() |
| | #2 (permalink) |
| | Re: copy folder to a network share??? "sideshow" <sideshow@newsgroup> wrote in message news:45D15D35-51C2-4704-9E2B-2EC30133F84F@newsgroup Quote: > Hopefully someone can help me see what is going on with a little .cmd file > that I wanted to copy data from WindowsXP PCs to a network share. First, > the > command : > > \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My > Documents" /COPYALL /v /NP /R:2 /w:3 > > And the SET info from one of the PCs: > HOMEDRIVE=Z: > HOMEPATH=\ > HOMESHARE=\\Dc1\Users\jwayne > LOGONSERVER=\\DC1 > USERNAME=jwayne > USERPROFILE=C:\Documents and Settings\jwayne > > If this command is run from any of the PCs for the first time it will > create > a folder in the %HOMESHARE% folder on the network, but instead of calling > it > "My Documents" as the command says, it calls it "teacher's Documents". I > have no idea why. And it copies no data into the folder on the network, > but > I am unsure whether that is correct or not, because I do not know where > this > "teacher's documents" folder is. Any idea where I went wrong? thanks > instance of the Command Processor other than the one you used for the robocopy command. To be sure that you're looking at the right thing, you should use a batch file similar to this one: @echo off set > c:\set.txt \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My Documents" /COPYALL /v /NP /R:2 /w:3 Now have a look at c:\set.txt and see if the apparent contradiction still exists. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: copy folder to a network share??? Thanks. Even from the code you sent the SET parameters are still the same as I pasted before and this mysterious "teacher" does not show up in there anywhere. Any other ideas of what I might have done wrong? Pegasus [MVP] wrote: Quote: > "sideshow" <sideshow@newsgroup> wrote in message > news:45D15D35-51C2-4704-9E2B-2EC30133F84F@newsgroup Quote: >> Hopefully someone can help me see what is going on with a little .cmd file >> that I wanted to copy data from WindowsXP PCs to a network share. First, >> the >> command : >> >> \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My >> Documents" /COPYALL /v /NP /R:2 /w:3 >> >> And the SET info from one of the PCs: >> HOMEDRIVE=Z: >> HOMEPATH=\ >> HOMESHARE=\\Dc1\Users\jwayne >> LOGONSERVER=\\DC1 >> USERNAME=jwayne >> USERPROFILE=C:\Documents and Settings\jwayne >> >> If this command is run from any of the PCs for the first time it will >> create >> a folder in the %HOMESHARE% folder on the network, but instead of calling >> it >> "My Documents" as the command says, it calls it "teacher's Documents". I >> have no idea why. And it copies no data into the folder on the network, >> but >> I am unsure whether that is correct or not, because I do not know where >> this >> "teacher's documents" folder is. Any idea where I went wrong? thanks >> > I suspect that you obtained the above environmental variables from an > instance of the Command Processor other than the one you used for the > robocopy command. To be sure that you're looking at the right thing, you > should use a batch file similar to this one: > @echo off > set > c:\set.txt > \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My > Documents" /COPYALL /v /NP /R:2 /w:3 > > Now have a look at c:\set.txt and see if the apparent contradiction still > exists. > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: copy folder to a network share??? "sideshowblah" <sideshowblah@newsgroup> wrote in message news:uW6g0MPTKHA.1280@newsgroup Quote: > Thanks. Even from the code you sent the SET parameters are still the same > as I pasted before and this mysterious "teacher" does not show up in there > anywhere. Any other ideas of what I might have done wrong? > and environmental variables. To really nail down what you claim, run the self-documenting batch file below, then post the contents of c:\test.txt. @echo off if exist "%HOMESHARE%\My Documents" ( echo Sorry, the folder "%HOMESHARE%\My Documents" already exists. echo Please save its files elsewhere, then delete the folder." echo. pause goto :eof ) if exist "%HOMESHARE%\Teacher's Documents" ( echo Sorry, the folder "%HOMESHARE%\Teacher's Documents" already exists. echo Please save its files elsewhere, then delete the folder." echo. pause goto :eof ) echo %date% %time% > c:\test.txt set >> c:\test.txt echo. >> c:\test.txt echo Source folder=%USERPROFILE%\My Documents >> c:\test.txt echo Target folder=%HOMESHARE%\My Documents >> c:\test.txt \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My Documents" /COPYALL /v /NP /R:2 /w:3 1>>c:\test.txt 2>>&1 echo. >> c:\test.txt echo Contents of %HOMESHARE%\My Documents: >>c:\test.txt dir "%HOMESHARE%\My Documents" 1>>c:\test.txt 2>>&1 echo. >> c:\test.txt echo Contents of %HOMESHARE%\Teacher's Documents: >>c:\test.txt dir "%HOMESHARE%\Teacher's Documents" 1>>c:\test.txt 2>>&1 echo. >> c:\test.txt set >> c:\test.txt echo %date% %time% >> c:\test.txt |
My System Specs![]() |
| | #5 (permalink) |
| | Re: copy folder to a network share??? thanks for your help. The script helped me see more clearly what I was looking at. The problem is with Windows Explorer showing the folder name that is created by the script as "teacher's documents" and the actual name is "My Documents" as shown with a "dir \\DC1\jwayne\" Still not sure why Explorer shows this different name, but I guess I get to that later. thanks for your help with the script. Pegasus [MVP] wrote: Quote: > "sideshowblah" <sideshowblah@newsgroup> wrote in message > news:uW6g0MPTKHA.1280@newsgroup Quote: >> Thanks. Even from the code you sent the SET parameters are still the same >> as I pasted before and this mysterious "teacher" does not show up in there >> anywhere. Any other ideas of what I might have done wrong? >> > What you report goes against everything known about accessing file shares > and environmental variables. To really nail down what you claim, run the > self-documenting batch file below, then post the contents of c:\test.txt. > > @echo off > if exist "%HOMESHARE%\My Documents" ( > echo Sorry, the folder "%HOMESHARE%\My Documents" already exists. > echo Please save its files elsewhere, then delete the folder." > echo. > pause > goto :eof > ) > > if exist "%HOMESHARE%\Teacher's Documents" ( > echo Sorry, the folder "%HOMESHARE%\Teacher's Documents" already exists. > echo Please save its files elsewhere, then delete the folder." > echo. > pause > goto :eof > ) > > echo %date% %time% > c:\test.txt > set >> c:\test.txt > echo. >> c:\test.txt > echo Source folder=%USERPROFILE%\My Documents >> c:\test.txt > echo Target folder=%HOMESHARE%\My Documents >> c:\test.txt > \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My > Documents" /COPYALL /v /NP /R:2 /w:3 1>>c:\test.txt 2>>&1 > echo. >> c:\test.txt > echo Contents of %HOMESHARE%\My Documents: >>c:\test.txt > dir "%HOMESHARE%\My Documents" 1>>c:\test.txt 2>>&1 > echo. >> c:\test.txt > echo Contents of %HOMESHARE%\Teacher's Documents: >>c:\test.txt > dir "%HOMESHARE%\Teacher's Documents" 1>>c:\test.txt 2>>&1 > echo. >> c:\test.txt > set >> c:\test.txt > echo %date% %time% >> c:\test.txt > > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: copy folder to a network share??? Thanks for the feedback. "sideshowblah" <sideshowblah@newsgroup> wrote in message news:%23jF8nKkVKHA.4780@newsgroup Quote: > thanks for your help. The script helped me see more clearly what I was > looking at. The problem is with Windows Explorer showing the folder name > that is created by the script as "teacher's documents" and the actual name > is "My Documents" as shown with a "dir \\DC1\jwayne\" > Still not sure why Explorer shows this different name, but I guess I get > to that later. thanks for your help with the script. > > Pegasus [MVP] wrote: Quote: >> "sideshowblah" <sideshowblah@newsgroup> wrote in message >> news:uW6g0MPTKHA.1280@newsgroup Quote: >>> Thanks. Even from the code you sent the SET parameters are still the >>> same as I pasted before and this mysterious "teacher" does not show up >>> in there anywhere. Any other ideas of what I might have done wrong? >>> >> What you report goes against everything known about accessing file shares >> and environmental variables. To really nail down what you claim, run the >> self-documenting batch file below, then post the contents of c:\test.txt. >> >> @echo off >> if exist "%HOMESHARE%\My Documents" ( >> echo Sorry, the folder "%HOMESHARE%\My Documents" already exists. >> echo Please save its files elsewhere, then delete the folder." >> echo. >> pause >> goto :eof >> ) >> >> if exist "%HOMESHARE%\Teacher's Documents" ( >> echo Sorry, the folder "%HOMESHARE%\Teacher's Documents" already >> exists. >> echo Please save its files elsewhere, then delete the folder." >> echo. >> pause >> goto :eof >> ) >> >> echo %date% %time% > c:\test.txt >> set >> c:\test.txt >> echo. >> c:\test.txt >> echo Source folder=%USERPROFILE%\My Documents >> c:\test.txt >> echo Target folder=%HOMESHARE%\My Documents >> c:\test.txt >> \\dc1\readme\robocopy.exe "%USERPROFILE%\My Documents" "%HOMESHARE%\My >> Documents" /COPYALL /v /NP /R:2 /w:3 1>>c:\test.txt 2>>&1 >> echo. >> c:\test.txt >> echo Contents of %HOMESHARE%\My Documents: >>c:\test.txt >> dir "%HOMESHARE%\My Documents" 1>>c:\test.txt 2>>&1 >> echo. >> c:\test.txt >> echo Contents of %HOMESHARE%\Teacher's Documents: >>c:\test.txt >> dir "%HOMESHARE%\Teacher's Documents" 1>>c:\test.txt 2>>&1 >> echo. >> c:\test.txt >> set >> c:\test.txt >> echo %date% %time% >> c:\test.txt >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Vista can't copy files from network share on XPPro | Vista networking & sharing | |||
| copy folder with hidden share | VB Script | |||
| Vista requires admin rights to copy file to network share | Vista networking & sharing | |||
| Copy from network share hangs, can't cancel, can't shutdown....... | Vista General | |||
| Copy to network share on Vista machine causes error | Vista General | |||