Computing.Net > Forums > Disk Operating System > Max characters in command line

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Max characters in command line

Reply to Message Icon

Name: FoxproProgrammer
Date: July 2, 2007 at 10:59:40 Pacific
OS: MS-DOS 6.0
CPU/Ram: 386 class / 16MB RAM
Comment:

I am linking a program that requires the following syntax.

LINK program module1 module2 module3...

DOS limits the number of characters that can be entered on the command line so it truncates when it gets to module13. This produces error in the LINK. My LINK command is in a batch file, but it doesn't make any difference if the LINK is executed from a batch file or the command line prompt. Is there a way around this? Maybe create two commands and concatenate them together? Thanks for any suggestions.

DZ



Sponsored Link
Ads by Google

Response Number 1
Name: wizard-fred
Date: July 2, 2007 at 13:16:34 Pacific
Reply:

Rename the modules shorter, There might be a setting in CONFIG.SYS.


0

Response Number 2
Name: cup
Date: July 2, 2007 at 13:23:34 Pacific
Reply:

Link will accept an input file with all the commands. Type link /help and it should tell you what to do. If I remember correctly, it is something like link @filename


0

Response Number 3
Name: DosX
Date: July 2, 2007 at 14:19:21 Pacific
Reply:

Another option would be to use 4DOS command interpreter as it allows longer commands. You can download it from here: http://4dos.hit.bg/


0

Response Number 4
Name: dtech10
Date: July 2, 2007 at 15:23:48 Pacific
Reply:

Hi
It's a long time since I used MsDos 6, but
will creating environment variables help.
ie.
set Line1=Module1 Module2.......
set Line2=Module7...........

Link program %Line1%
link program %Line2%


0

Response Number 5
Name: Mechanix2Go
Date: July 3, 2007 at 04:23:50 Pacific
Reply:

All good advice there.

While we're at it, what is the command line limit in plain vanilla MSDOS?

127?

255?


=====================================
If at first you don't succeed, you're about average.

M2



0

Related Posts

See More



Response Number 6
Name: DosX
Date: July 3, 2007 at 10:15:12 Pacific
Reply:

I don't know for MS-DOS, but DR/Novell/OpenDos has a limit of 128 characters. That was expanded to 255 in last WIP release of EDR-DOS (17.6.2007)(http://www.drdosprojects.de/forum/drp_forum/posts/5851.html)
I would expect MS-DOS to have the same limitation as DR-DOS but I don't have it installed at the moment so I can't verify it.


0

Response Number 7
Name: dtech10
Date: July 3, 2007 at 14:36:42 Pacific
Reply:

Hi
I guess if they are all called ModuleN you
could use something like this, which would give you more on the command line, but maybe
slow the execution down.
Use like this
BatchFileName 1 2 3 4 5 6 7 8 9 ........
--
@echo off
:Top
if "%1"=="" goto End
Link Program Module%1
shift
goto Top
:End


0

Response Number 8
Name: FoxproProgrammer
Date: July 10, 2007 at 11:28:01 Pacific
Reply:

Hello, everyone!

Thank you for all the excellent ideas. I tried cup's idea before I posted here.

link @filename

It didn't work. For some reason it substituted everything in filename on the command line and ran out of space as if I had typed it manually. I tried it again after cup suggested it, and this time it worked. I don't know what I did different this time, but I'm just glad that it works! I would like to try some of the other ideas as well and will let you all know if they work.

The command line started truncating after the 127th character.

Thanks again for everyone's ideas. It's nice to know that there are so many helpful people out there.

Best regards,


DZ


0

Response Number 9
Name: Mechanix2Go
Date: July 10, 2007 at 11:39:41 Pacific
Reply:

TY for the update.


=====================================
If at first you don't succeed, you're about average.

M2



0

Sponsored Link
Ads by Google
Reply to Message Icon






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: Max characters in command line

return key in command line www.computing.net/answers/dos/return-key-in-command-line/3709.html

what are actual commands in COMMAND www.computing.net/answers/dos/what-are-actual-commands-in-command/13177.html

cut first 3 characters in every... www.computing.net/answers/dos/cut-first-3-characters-in-every/14695.html