home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Applications and Operating Systems
Ask a Tech Support Question (free)!

bat file problem running xcopy

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1601
Discussions: 200,904, Posts: 2,378,870, Members: 246,272
Old November 4th, 2008, 03:56 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 6
bat file problem running xcopy

Hi, I'm running an XCOPY command within a bat file. The XCOPY takes several hours to run, lots of large files. Once it gets to the XCOPY, it copies all the files, but it does not continue to the next line in the bat file. It just stops. Any idea what is going on? Is there some sort of timeout? This is on a Windows 2000 server. The command looks like:

xcopy /O /Y E:\aaa\bbb\*.* E:\ccc\ddd\data 1>> E:\backup\log\backup_log.txt

Again, all the files are copied, but it doesn't execute the next line which is
echo . >> E:\backup\log\backup_log.txt

Any ideas?
Cdor is offline   Reply With Quote
Old November 4th, 2008, 05:53 PM     #2 (permalink)
Ride 'em Cowboy
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 8,774
Not sure what you >> are suppose to do....The following should work.

ECHO E:\backup\log\backup_log.txt
__________________
Have you hugged your kid today??
Steve R Jones is offline   Reply With Quote
Old November 5th, 2008, 09:26 AM     #3 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 6
does anyone know if there is a problem with bat files timing out? When I do the XCOPY, it takes about 4 hours. I am thinking that maybe the bat file times out and execution never returns to process the next few lines in the bat file.
Cdor is offline   Reply With Quote
Old November 5th, 2008, 09:39 AM     #4 (permalink)
Ride 'em Cowboy
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 8,774
I don't see how it can time out if you're getting all the files copied.

Could you live without the /O switch?

Approx how many files and what is the total size?

You might want to research RoboCopy that ships with Vista. It's much more powerful. You can get it as part of the tools here or copy it off a Vista machine:
Download details: Windows Server 2003 Resource Kit Tools
Steve R Jones is offline   Reply With Quote
Old November 5th, 2008, 09:47 AM     #5 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 6
there are 71 database files, total of 14 gig. I'm thinking of adding the /C switch. Maybe there is some sort of error (although all the files are being copied)? I'd like to retain the /O switch since this is a database backup, unless there is some reason that I should drop it.
Cdor is offline   Reply With Quote
Old November 5th, 2008, 10:01 AM     #6 (permalink)
Ride 'em Cowboy
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 8,774
robocopy, or "Robust File Copy", is a command-line directory replication command. It was available as part of the Windows Resource Kit, and introduced as a standard feature of Windows Vista and Windows Server 2008.

Robocopy is designed for reliable mirroring of directories or directory trees. It has features to ensure all NTFS attributes and properties are copied, and includes additional restart code for network connections subject to disruption.

Robocopy is notable for capabilities above and beyond the built-in Windows copy and xcopy commands, including the following:
Continued here:
robocopy - Wikipedia, the free encyclopedia
Steve R Jones is offline   Reply With Quote
Old November 5th, 2008, 10:30 AM     #7 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 6
is robocopy any faster than xcopy?
Cdor is offline   Reply With Quote
Old November 5th, 2008, 12:49 PM     #8 (permalink)
Ride 'em Cowboy
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 8,774
I've never used it. But

"Robocopy is notable for capabilities above and beyond the built-in Windows copy and xcopy commands"

sure would motivate me to at least try it.

You could do a test run with a small group of files.
Steve R Jones is offline   Reply With Quote
Old November 5th, 2008, 02:14 PM     #9 (permalink)
Caveat Emptor
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 3,241
Send a message via AIM to Rootstonian
4 hours? 14 gigs? I take it you're not on a gigabit network LOL...my in-house moves 20 gigs in about 8 minutes!!!
Rootstonian is offline   Reply With Quote
Old November 6th, 2008, 12:10 PM     #10 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 6
Well actually ...., the entire script takes about 4 hrs and it shuts down lots of services including the Oracle Database. I'm not sure how long the copy piece takes. I'll have to put a time in the script. This is an old HP server, Proliant DL380 G3. The drive is an internal logical (partitioned) COMPAQ SCSI drive. But the copy is probably taking longer than normal because it's being copied to a compressed folder, which adds some overhead.
Cdor is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
xcopy the newest file bilbonvidia Applications and Operating Systems 1 April 17th, 2007 02:06 PM
Running .exe's with Run As in a .bat file Sledgehammer Technical Support 3 December 4th, 2003 09:13 AM
Create a .bat file shotokan General Tech Discussion 10 May 28th, 2003 10:13 AM
running a .bat in win98... how do I? zskillz Technical Support 14 November 25th, 2002 03:20 AM
autoexec.bat file isup General Tech Discussion 16 October 24th, 2002 04:20 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2799)
Is the PSU I received dead? (10)
Install XP pro and a Vista laptop ?.. (7)
California Passes Anti-Flat-HDTV Le.. (38)
A good PSU? (10)
Foreign voltage (5)
New Computer wont recognize XP disc (7)
Fox uses old news clips to inflate .. (33)
HIS HD5770 graphic card question (10)
Dept. of HS: NSA 'Helped' Develop V.. (12)
Print spooler problem (5)
EVGA 9800 gtx help with finding a g.. (6)
Ideal cheap graph card for PC-Gamin.. (13)
Mysterious Boot manager (9)
Recent Discussions
Asus P4G8X Mobo (0)
Amptron monitor G17FP-Black (0)
Monitor doesn't turn on , Computer do.. (11)
Ccapp? What is it and why won't it sh.. (10)
EVGA 9800 gtx help with finding a goo.. (6)
A good PSU? (10)
Install XP pro and a Vista laptop ?? (7)
Is the PSU I received dead? (10)
Ideal cheap graph card for PC-Gaming? (13)
HP Pavillion Laptop ze4220 won't turn.. (7)
HIS HD5770 graphic card question (10)
Dept. of HS: NSA 'Helped' Develop Vis.. (12)
Foreign voltage (5)
Convert 5 pin Keyboard to USB (11)
Print spooler problem (5)
hybernate option (2)
Steam ID's, Gamertags etc... (1)
New Computer wont recognize XP disc (7)
World's largest Monopoly Game using G.. (328)
Modern Warfare 2: Who Bought It? (60)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (28)
blender help (2)
Hard drive freezes boot (1)
Mysterious Boot manager (9)
System recovery disk maker (2)


All times are GMT -4. The time now is 12:44 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28