Computing.Net > Forums > Disk Operating System > Need to re-write COPY command

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Need to re-write COPY command

Reply to Message Icon

Original Message
Name: Tom Josam
Date: December 6, 1999 at 10:20:41 Pacific
Subject: Need to re-write COPY command
Comment:

Is it possible to re-write the DOS COPY
command to suppress the "One file(s) copied"
message after copy completion? If so, has
anyone seen this as a free utility?


Report Offensive Message For Removal


Response Number 1
Name: nanoguru
Date: December 6, 1999 at 13:07:52 Pacific
Reply:

command.com is resonsible for this message.
Don't know if this will work.
If you can find the actual text message in command.com then use a hex editor and replace the text with spaces or 20 hexa decimal


Report Offensive Follow Up For Removal

Response Number 2
Name: MM
Date: December 6, 1999 at 15:51:14 Pacific
Reply:

Beware.
Editing Command.Com will in most case damage it. If you wish to try this make a safe backup copy first.

Why do you need to surpress this message?


Report Offensive Follow Up For Removal

Response Number 3
Name: Igor M
Date: December 6, 1999 at 21:01:16 Pacific
Reply:

Hi,

To suppress this message you can use output redirection to NUL device. For example:

Copy FileName C:\DirName > NUL

Good luck, Igor M


Report Offensive Follow Up For Removal

Response Number 4
Name: nanoguru
Date: December 7, 1999 at 12:08:44 Pacific
Reply:

The following Qbasic program will alter the DOS 6.2 version of command.com (54,619 bytes)

OPEN "c:\command.com" FOR BINARY AS #1

S$ = chr$(8) + space$(14)

SEEK #1, &H943A&

PUT #1, ,s$

CLOSE

END

DOS checks to see if the text message "1 File(s) copied" has been tampered with. It only checks the first character of the message though. A long as the "1" is not changed we can change the rest of the text to spaces.
So we are forced to print the "1" to the screen but the "1" can be removed from the screen by printing the backspace character. This is ASCII character 8. Reboot the machine after running the program. Caution this change has not been thoroughly tested but it seems to work.


Report Offensive Follow Up For Removal

Response Number 5
Name: nanoguru
Date: December 10, 1999 at 12:59:28 Pacific
Reply:

Here is another version of the program that will let you create a custom message for the "copy" command.

CLS

OPEN #1, "C:\COMMAND.COM" FOR BINARY AS #1

DIM V AS STRING * 22

SEEK #1, &H2199&

GET #1, , V$

IF V$ <> "MS-DOS(R) Version 6.20" THEN
PRINT "Wrong Version"
CLOSE
END
END IF

PRINT V$
PRINT
INPUT "Enter custom message"; CM$

IF LEN(CM$) > 14 THEN
PRINT "Custom message is too long"
CLOSE
END
END IF

S$ = CHR$(8) + CM$ + SPACE$(14-LEN(CM$))

SEEK #1, &H943A&

PUT #1, , S$

CLOSE

END
*********
Make sure the line in config.sys reads:
SHELL = C:\command.com /p

After typing in the program, save it, then run it. Now re-boot.
*********
I want to see the same program in C++ and Pascal so all of us can see just what the college instructors have been teaching. A fair challenge.


Report Offensive Follow Up For Removal







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



Results for: Need to re-write COPY command

QUICK BASIC 4.5
    Summary: By the way, go to the subject"need to re-write the copy command" and you'll find a guru special....
www.computing.net/answers/dos/quick-basic-45/1600.html

I need to reformat my computer+install all new dos and windows. HELP!!
    Summary: Hi,I have a newer computer running windows 98 that is secured with a password that I dont know.On bootup there is box with a check mark in it. My mouse wont even move like it is froze up. I was told I...
www.computing.net/answers/dos/i-need-to-reformat-my-computerinstall-all-new-dos-and-windows-help/2053.html

I need to get Quick Basic 4.5!
    Summary: I need to get a copy of Quick Basic 4.5 for a class that I am taking. If anyone can help me, I would greatly appreciate it. I need to get a copy fast!!!!! ...
www.computing.net/answers/dos/i-need-to-get-quick-basic-45/6900.html






Which MP3 player do you have?

iPod/iPhone
Zune
Something Else
None


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History






Data Recovery Software