Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 2nd, 2004, 04:17 AM
ScriptHamWrk ScriptHamWrk is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: East midlands in the UK.
Posts: 13 ScriptHamWrk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 57 sec
Reputation Power: 0
XP Batch File

Introduction
My pc is an Intel cpu running Windows XP pro. the LAN is ethernet 100Mbit/s with an Intel File server and Windows NT 2003. I intend to serve Access mdb data using HTML and ASP. As I have met problems connecting to F:\...\*.mdb I intend to use c:\ as web and database server. This should be faster as paging to F:\ is omitted. Initial attempts are promising.

Problem
This is all very well and good but c:\ is not backed up whilst F:\ is. So I wrote a script to copy the files from c:\ to F:\ which worked, as you would expect. So I wrote the script in Notepad and saved it as c:\Batch\xcopy.bat. In short it doesn't work. Start -> Run -> c:\Batch\xcopy.bat opens C:\Windows\System32\cmd.exe, DOS box pops up and cycles interminably through the first line even if it is commented out. No files are copied. I have not set XP up in any way - no unusual configuration.

Question
What am I to do, I just feel that there is something quite simple that I have overlooked?
Please help - if you can get me going on one batch file I should be able to add others in the same way and that will simplify life.
Many thanks
ScriptHam.

Code:

xcopy c:\inetpub\wwwroot\cLIMS F:\dat1916\LIMS\c_wwwroot_copy /D /E /K /W /V 
xcopy c:\inetpub\wwwroot\Default.htm F:\dat1916\LIMS\c_wwwroot_copy /D /E /K /W /V 
::END
:: prepared 01/12/04 to copy the FK20 files 
:: and to copy some c:\inetpub files to F:\...\LIMS for backup.
:: At the moment the idea is to addnew on F:\ and to copy this to c: for Lookup. 
:: Longer term that may be reversed using c:\ for main storage.
:: To be extended in scope to run at fixed times, to produce a log file on F:\ etc. 
:: Problem History
:: Opens C:\Windows\System32\cmd.exe. Cycles interminably through the first line even if it is commented out.
:: No files are copied. Note it works fine fromthe command line interface.

  

Reply With Quote
  #2  
Old December 2nd, 2004, 04:26 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Rename your batch file. Typing XCOPY at a prompt will call the native XCOPY program. Rename your batch file to MYXCOPY.BAT and try again
__________________
selwonk

If I've posted some code above, you might think it looks a bit simplistic. It might be. I'd rather people tried the next step themselves rather than getting a full solution on a plate. That way they learn more!

Reply With Quote
  #3  
Old December 2nd, 2004, 04:26 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
In fact, if the batch file is called XCOPY, when it runs XCOPY within itself, it is probably calling itself over and over again

Reply With Quote
  #4  
Old December 2nd, 2004, 06:19 AM
ScriptHamWrk ScriptHamWrk is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: East midlands in the UK.
Posts: 13 ScriptHamWrk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 57 sec
Reputation Power: 0
Thumbs up Batch File Problem Resolved

Yes yes yes.
Reserved words and file names eh.
I'm much obliged Selwonk
Thanks.

Reply With Quote
  #5  
Old December 2nd, 2004, 06:27 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
No problem at all

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > XP Batch File


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway