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: 1448
Discussions: 200,509, Posts: 2,374,400, Members: 245,831
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,698
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,698
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,698
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,698
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,232
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? (1635)
FT HOOD attack: 7 killed 12 injured (66)
Review My Build (5)
HELP!!! What do you think of this s.. (16)
Looking for a graphic card that wil.. (30)
Assosiations (21496)
My 1st pc build (40)
Aero in Vista (7)
PC Modern Warfare 2: it's much wors.. (12)
core i7 extreme 975, nvidia 9400gt (9)
How to Ship a PC (16)
Building my first computer (13)
[F@H SPAM 11/1/09]New month . . . n.. (33)
slaving laptop drive (7)
Recent Discussions
FAT32 to NTFS file system in Win2kpro (4)
windows 7 retail and rtm (0)
Internet very slow since updating AVG.. (8)
sell cvv us-uk-eu-au...very good. who.. (0)
how to convert mod to wmv/avi/mp4/mov.. (0)
Motherboards and my curse... (25)
Review My Build (5)
HELP!!! What do you think of this sys.. (16)
New Processor, Monitor will not turn .. (2)
2009 Build (4)
My 1st pc build (40)
Freezing During Music/Movies (1)
Windows Experience Index is screwed u.. (2)
ext. sound card laptop to stereo syst.. (2)
Remote Desktop via SSH and error mess.. (2)
Help and Support disappeared from my .. (0)
[F@H SPAM 11/1/09]New month . . . new.. (33)
Basic applications needed for "r.. (1)
core i7 extreme 975, nvidia 9400gt (9)
hard drive problem (2)
Win7 TrustedInstaller Permissions (2)
Speed up Win 7 boot time a bit (1)
Hard Drive test program (2)
wireless westell versalink model 327w (1)
New build 10 second reboot cycle! Won.. (3)


All times are GMT -4. The time now is 05:57 AM.
TechIMO Copyright 2008 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