Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: xcopy issues from local to network drive

26 May 2012   #1
Raiden1803

Windows 7
 
 
xcopy issues from local to network drive

Hello all. newbie here.

strange problem with xcopy.. started happening only with this specific batch file i wrote to back files up to my network drive. Basically i'm backing three local drives "I: (thumb drive) C: and E: To my network drive. X: (which is a seagate goflex home if that means anything..)

with this specific batch file i cannot seem to copy anything local to my network drive. instead i get a "invalid path" error message. this is my script.

Code:
@echo off
:restart
echo NETWORK DRIVE BACKUP AND RESTORE SCRIPT. 
echo Would You like to backup, or load?
set input=
set /p input=load,backup, or exit?
if %input%==load goto load
if %input%==backup goto backup
if %input%==exit goto exit
echo not a valid input
goto restart


:backup
xcopy	"I:\*.*"										"X:\Thumb drive"									/E /T /I /Y /D:5-15-2012
xcopy	"C:\Users\Dwight Sarmiento\My Documents\"						"X:\Documents"										/E /T /I /Y /D:5-15-2012
xcopy   "C:\Users\Dwight Sarmiento\AppData\Roaming\.minecraft\saves" 			 	"X:\Saved Game Files\Minecraft" 							/E /T /I /Y /D:5-15-2012
xcopy 	"C:\Users\Dwight Sarmiento\My Documents\My Games\Skyrim" 				"X:\Saved Game Files\Skyrim"				 				/E /T /I /Y /D:5-15-2012	
xcopy	"C:\Users\Dwight Sarmiento\My Documents\Square Enix\Batman Arkham Asylum GOTY"		"X:\Saved Game Files\Batman Arkham Asylum GOTY" 					/E /T /I /Y /D:5-15-2012
xcopy	"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\GFWLive" 			 	"X:\Saved Game Files\Batman Arkham Asylum GOTY\GFWLive" 				/E /T /I /Y /D:5-15-2012
xcopy	"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\Xlive" 				"X:\Saved Game Files\Batman Arkham Asylum GOTY\Xlive" 					/E /T /I /Y /D:5-15-2012	
xcopy	"C:\Users\Dwight Sarmiento\Appdata\Local\SWTOR\"					"X:\swtor"										/E /T /I /Y /D:5-15-2012
xcopy	"E:\Backgrounds" 									"X:\Backgrounds" 									/E /T /I /Y /D:5-15-2012
Xcopy	"E:\Applications" 									"X:\Applications"									/E /T /I /Y /D:5-15-2012
xcopy	"E:\Iphone" 										"X:\Iphone" 										/E /T /I /Y /D:5-15-2012
echo Files Successfully Copied
pause
exit

:load
Xcopy	"X:\Thumb Drive"									"I:\*.*"										/E /I /Y				
xcopy 	"X:\Saved Game Files\Minecraft" 							"C:\Users\Dwight Sarmiento\AppData\Roaming\.minecraft\saves" 				/E /I /Y
xcopy 	"x:\Saved Game Files\Skyrim" 								"C:\Users\Dwight Sarmiento\My Documents\My Games\Skyrim"				/E /I /Y
xcopy 	"X:\Saved Game Files\Batman Arkham Asylum GOTY" 					"C:\Users\Dwight Sarmiento\My Documents\Square Enix\Batman Arkham Asylum GOTY" 		/E /I /Y
xcopy	"X:\Saved Game Files\Batman Arkham Asylum GOTY\GFWLive"  				"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\GFWLive"				/E /I /Y
xcopy	"X:\Saved Game Files\Batman Arkham Asylum GOTY\Xlive" 					"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\Xlive"				/E /I /Y
xcopy	"I:\swtor"										"C:\Users\Dwight Sarmiento\Appdata\Local\SWTOR\"					/E /I /Y	
xcopy	"X:\Backgrounds" 									"E:\Backgrounds" 									/E /I /Y
Xcopy	"X:\Applications" 									"E:\Applications"									/E /I /Y
xcopy	"X:\Iphone" 										"E:\Iphone" 										/E /I /Y

echo Files Successfully Loaded
pause
exit

:exit
exit
to make matters even more weirder i have another script that i use to backup my itunes library to my network drive, which oddly enough works just fine.

Code:
@echo off
:restart
echo ITUNES LIBRARY BACKUP AND RESTORE SCRIPT
echo would you like to backup, or load?
set input=
set /p input=load,backup, or exit?
if %input%==load goto load
if %input%==backup goto backup
if %input%==exit goto exit
echo not a valid input
goto restart


:backup

xcopy	"E:\Itunes Library" 					"X:\Itunes Library" 	 /E /Y 

echo files Successfully Copied
pause
exit

:load

xcopy	"X:\Itunes Library"					"E:\Itunes Library"	 /E /Y	/D:5-15-2012				


echo files Successfully Loaded
pause
exit

:exit
exit
I'm not sure what im missing here, the "network drive backup and restore script" worked fine once. and now, not so much.

if anyone has any ideas on whats going wrong with my first script, i'd appreciate it.

thanks,


My System SpecsSystem Spec
.
26 May 2012   #2
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

do you run it form command prompt window?

if so do manually:
Code:
xcopy	"I:\*.*"     "X:\Thumb drive"  /E /T /I /Y /D:5-15-2012
works?
My System SpecsSystem Spec
26 May 2012   #3
Raiden1803

Windows 7
 
 

Doesnt look like it, or atleast correctly anyway. when done manually it acts like its hanging there in the command prompt window and doesnt display any kind of output of what its doing. however i was able to catch it copying files to the "thumb drive" folder, even though it missed alot of things.
My System SpecsSystem Spec
.

26 May 2012   #4
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

remove the \ after swtor!
So replace C:\Users\Dwight Sarmiento\Appdata\Local\SWTOR\
with C:\Users\Dwight Sarmiento\Appdata\Local\SWTOR

it's on two places!
replace I:\*.* with I:\
My System SpecsSystem Spec
26 May 2012   #5
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by Raiden1803 View Post
Doesnt look like it, or atleast correctly anyway. when done manually it acts like its hanging there in the command prompt window and doesnt display any kind of output of what its doing. however i was able to catch it copying files to the "thumb drive" folder, even though it missed alot of things.
what does it miss? empty folders? hidden files?
My System SpecsSystem Spec
26 May 2012   #6
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

remove /T as well in all xcopy commands!
so simply open script in notepad and replace /T with nothing

xcopy/?
This shows you what /T does. It only creates folder structure and doesn't copy files!
My System SpecsSystem Spec
26 May 2012   #7
Raiden1803

Windows 7
 
 

I have /T in there to create the directory structure. otherwise xcopy throws this at me
Code:
Does X:\Applications specify a file name or directory on the target.F=File, D=Directory
each time i add something new to the script. is their another way to avoid that error so i dont have to keep hitting D all the time so it creates a new directory?

also, Removing the"\" did nothing, still getting the 'invalid path' error.

updated script:

Code:
@echo off
:restart
echo NETWORK DRIVE BACKUP AND RESTORE SCRIPT. 
echo Would You like to backup, or load?
set input=
set /p input=load,backup, or exit?
if %input%==load goto load
if %input%==backup goto backup
if %input%==exit goto exit
echo not a valid input
goto restart


:backup


xcopy	"C:\Users\Dwight Sarmiento\Appdata\Local\SWTOR"						"X:\swtor"										/E /T /I /Y /D:5-15-2012															
xcopy	"C:\Users\Dwight Sarmiento\My Documents\"						"X:\Documents"										/E /T /I /Y /D:5-15-2012
xcopy   "C:\Users\Dwight Sarmiento\AppData\Roaming\.minecraft\saves" 			 	"X:\Saved Game Files\Minecraft" 							/E /T /I /Y /D:5-15-2012
xcopy 	"C:\Users\Dwight Sarmiento\My Documents\My Games\Skyrim" 				"X:\Saved Game Files\Skyrim"				 				/E /T /I /Y /D:5-15-2012	
xcopy	"C:\Users\Dwight Sarmiento\My Documents\Square Enix\Batman Arkham Asylum GOTY"		"X:\Saved Game Files\Batman Arkham Asylum GOTY" 					/E /T /I /Y /D:5-15-2012
xcopy	"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\GFWLive" 			 	"X:\Saved Game Files\Batman Arkham Asylum GOTY\GFWLive" 				/E /T /I /Y /D:5-15-2012
xcopy	"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\Xlive" 				"X:\Saved Game Files\Batman Arkham Asylum GOTY\Xlive" 					/E /T /I /Y /D:5-15-2012	
xcopy	"E:\Backgrounds" 									"X:\Backgrounds" 									/E /T /I /Y /D:5-15-2012
xcopy	"E:\Applications" 									"X:\Applications"									/E /T /I /Y /D:5-15-2012
xcopy	"E:\Iphone" 										"X:\Iphone" 										/E /T /I /Y /D:5-15-2012
echo Files Successfully Copied
pause
exit

:load
xcopy	"X:\swtor"										"C:\Users\Dwight Sarmiento\Appdata\Local\SWTOR"						/E /I /Y
xcopy 	"X:\Saved Game Files\Minecraft" 							"C:\Users\Dwight Sarmiento\AppData\Roaming\.minecraft\saves" 				/E /I /Y
xcopy 	"x:\Saved Game Files\Skyrim" 								"C:\Users\Dwight Sarmiento\My Documents\My Games\Skyrim"				/E /I /Y
xcopy 	"X:\Saved Game Files\Batman Arkham Asylum GOTY" 					"C:\Users\Dwight Sarmiento\My Documents\Square Enix\Batman Arkham Asylum GOTY" 		/E /I /Y
xcopy	"X:\Saved Game Files\Batman Arkham Asylum GOTY\GFWLive"  				"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\GFWLive"				/E /I /Y
xcopy	"X:\Saved Game Files\Batman Arkham Asylum GOTY\Xlive" 					"C:\Users\Dwight Sarmiento\AppData\Local\Microsoft\Xlive"				/E /I /Y
xcopy	"X:\Backgrounds" 									"E:\Backgrounds" 									/E /I /Y
xcopy	"X:\Applications" 									"E:\Applications"									/E /I /Y
xcopy	"X:\Iphone" 										"E:\Iphone" 										/E /I /Y

echo Files Successfully Loaded
pause
exit

:exit
exit
My System SpecsSystem Spec
26 May 2012   #8
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

xcopy "C:\Users\Dwight Sarmiento\My Documents\"

it has also a \ at the end!!
Why don't you just say WHICH command fails!!
My System SpecsSystem Spec
26 May 2012   #9
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

xcopy "C:\Users\Dwight Sarmiento\My Documents\" "X:\Documents" /E /T /I /Y /D:5-15-2012

you wanna xcopy C:\Users\Dwight Sarmiento\My Documents and all subfolders.
But why do you have xcopy "C:\Users\Dwight Sarmiento\My Documents\My Games\Skyrim" and other one's in My Documts as well?
My System SpecsSystem Spec
26 May 2012   #10
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Does X:\Applications specify a file name or directory on the target.F=File, D=Directory

that doesn't occur if you use /I !!
My System SpecsSystem Spec
Reply

 xcopy issues from local to network drive




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Can't directly browse sub-folders below root drive on local network PC
PC is on domain. When entering path to a folder of another PC on the local network through it's administrative share i.e. "\\remotepc\c$\users\username\desktop" I get the message in the attached screen-grab. When I enter the path to the root drive "\\remotepc\c$" I get prompted for credentials,...
Network & Sharing
Network Drive Credentials without local accounts
Hey guys, im looking for some help with network drives. I am currently running win7 ultimate and am trying to share 2 drives: One HDD for movies and the other is a virtual BD-ROM drive. Problem is, i want to set it up so that the users on the network can have their own username and password to log...
Network & Sharing
Samsung s2 external hard drive not loading showing local disk F drive
I have a Samsung s2 1tb external hard drive. Today when I hooked it up to my laptop it would not load. It will shows local F drive when it usually will say samsung Drive. A pop up box will then appear stating "you need to format drive" I know if I reformat it I will lose all my data which...
Hardware & Devices
Will adding a 2nd network card improve local network transfer speed
This sounds really noobie of me but is it possible to improve local network transfer speed by adding a 2nd network card. I was planning to connect one exclusively for lan transfers and another one hooked to a separate wireless router. Right now only a maximum of 3 users can stream SD videos off...
Network & Sharing
Local Network Sharing Issues
I have a USB 3.0 drive. I am trying to share it with the entire network. I go to Properties->Sharing Share is greyed out. So I click 'Advanced Sharing' 'Share this folder' is checked. I click Permissions, I select 'Everyone' then below in Permissions for Everyone, I have "Read" checked...
Network & Sharing
Setting up a 2-way sync between local files and network drive
I'm trying to set up two way sync between some files on my laptop and a network drive so that changes made to either the copy on the network or on my laptop get propagated to each other. I've read the instructions for setting up an "offline file" sync, which is a one way sync. The instructions...
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:54.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App