Computing.Net > Forums > Disk Operating System > Dos Script option

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Dos Script option

Reply to Message Icon

Name: falko
Date: December 18, 2002 at 02:54:15 Pacific
OS: dos
CPU/Ram: 450/128
Comment:

Hi, can anyone help
my question has several questions:
I want to compare the two directories. I think this is an Nt file compare.exe. I also want to creat a batch file for this, sothat I can give this to someone sothat he can just run it without performing the manual task.

I started off like this (test123.bat):

rem compare 2 dir. and send to .txt file
comp %1 %2 > test123.txt

the command in dos
C:\>test123 c:\test\*.dll c:\test1\*.dll

Is there a way to automate this in the script, sothat it can answer automatically no. For example the question comes afterwards
Compare more files (Y/N) ? n

Is there a way just to show say the differnt date and size rather than the file contents?
not required!
not like this:
compare error at OFFSET 21C
file1 = EF
file2 = 61
Compare error at OFFSET 21D
file1 = 12
file2 = 13
rather like this:
i just want to see file1 is differnt in size with file2 or
file1 is differnt in date with file2


thanks in advance



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: December 19, 2002 at 08:52:04 Pacific
Reply:

In order to skip the prompt:

echo n|comp %1 %2

falko wrote:
> i just want to see file1 is differnt
> in size with file2 or file1 is differnt
> in date with file2

That's very different. COMP disregards DATE totally. What do you mean?

BTW, to only get a message saying if the files are different or not, without the differences, supress the output and use the errorlevel (0 if files are equal, 1 if not). Something like this:

echo n|comp %1 %2 12> nul
if not errorlevel=1 echo %1 and %2 are equal>> test123.txt
if errorlevel=1 echo %1 and %2 are different>> test123.txt

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br

_____________________________________________________


0
Reply to Message Icon

Related Posts

See More


Cabling Issues Runtime error 2



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Dos Script option

DOS script to format data? www.computing.net/answers/dos/dos-script-to-format-data/14358.html

DOS script for FTP upload www.computing.net/answers/dos/dos-script-for-ftp-upload/14559.html

Disk space check- Dos script www.computing.net/answers/dos/disk-space-check-dos-script/15339.html