Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Batch DOS Scripts 1

Status
Not open for further replies.

YL5956

MIS
Joined
Jul 11, 2001
Messages
73
Location
US
I'm trying to run a batch DOS script that would copy an entire directory from one partition to another. It's giving me an error saying not recognized external or internal command. Yet when I copy from the same partition it works fine. How can I fix this. I want to copy from C: to D: using xcopy command. D: being the logical parition. Thanks in advance.
 
HI!

When working with batch files, use the full path for commands , folders, and file names.
If you write here your batch file, you can get better and faster help.

Anyway, you might be interested in these programs:
XXCOPY from:

ROBOCOPY - from the NT resource kit.

MM Mirror - from my site:

Bye
Yizhar Hurwitz
 
Here is a copy of the batch file. It's routine COPY2 that is giving me the error. Routine COPY which basically do the same thing runs ok. Thanks
@echo off

for /f "tokens=2-4 delims=/ " %%a in ('DATE /T') do set Date=%%c-%%a-%%b
echo %date%
goto COPY


:COPY
xcopy C:\WINNT\Profiles\Administrator\Desktop\release C:\WINNT\Profiles\Administrator\Desktop\CsaRelease%Date% /q/i/e/s
goto COPY2

:COPY2
xcopy D:\Release
D:\install\CsaRelease%Date% /q/i/e/s

if not errorlevel=1 goto DELETE
echo Copy Function Failure Batch job.
goto EXIT



:DELETE
del D:\eChange_Man Test Folder\eChange_Man FF2\Word\*.* /q
goto EXIT



:EXIT
echo End of Batch Job
 
HI!

The XCOPY command is broken in to 2 lines.
This is not accepted in BATCH files.

Here is another utility, which I think can be the best solution for your needs:

(It is not mine. I just store a copy of it).

This great free utility by Pierce Business Systems will archive in ZIP format your folder for backup with pre-configured number of previous copies.


Bye

Yizhar Hurwitz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top