Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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

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

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%

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

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.

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

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

TY for the update.
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

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