xcopy issues from local to network drive

Page 1 of 2 12 LastLast

  1. Posts : 3
    Windows 7
       #1

    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 Computer


  2. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #2

    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 Computer


  3. Posts : 3
    Windows 7
    Thread Starter
       #3

    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 Computer


  4. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #4

    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 Computer


  5. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #5

    Raiden1803 said:
    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 Computer


  6. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #6

    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 Computer


  7. Posts : 3
    Windows 7
    Thread Starter
       #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 Computer


  8. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #8

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

    it has also a \ at the end!!
    Why don't you just say WHICH command fails!!
      My Computer


  9. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #9

    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 Computer


  10. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #10

    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 10:28.
Find Us