PC Review


Reply
Thread Tools Rate Thread

Increase limit of commandline length in Win2K?

 
 
msnews.microsoft.com
Guest
Posts: n/a
 
      30th Sep 2003
I'm trying to concatenate over 1000 pdfs together into one large one.
The util I am using allows me to create my own headings for each pdf as
it is added to the main pdf (better Table of Contents that way). The
problem is, it looks like I might end up having to create 30-50 cmd
files to get it all done, as cmd/command is puking on any command over
about 2K in size.

Is there any way to increase the buffer size for the commandline input?
If so, how, and how large can it go?

Trying to find this info on the MS site or Google has been very painful
so far.

 
Reply With Quote
 
 
 
 
Ritchie
Guest
Posts: n/a
 
      30th Sep 2003
"msnews.microsoft.com" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> I'm trying to concatenate over 1000 pdfs together into one large one.
> The util I am using allows me to create my own headings for each pdf as
> it is added to the main pdf (better Table of Contents that way). The
> problem is, it looks like I might end up having to create 30-50 cmd
> files to get it all done, as cmd/command is puking on any command over
> about 2K in size.
>
> Is there any way to increase the buffer size for the commandline input?
> If so, how, and how large can it go?


No, but you could cmd.exe from Windows XP, but IIRC this will only double
the current limit and take it to around 4K.

Alternatively try Franks RunProcess
http://64.38.67.11:8080/freeware/runprocess.zip

--
Ritchie, undo for mail


 
Reply With Quote
 
Walter Briscoe
Guest
Posts: n/a
 
      30th Sep 2003
In message <(E-Mail Removed)> of Mon, 29 Sep 2003
23:50:11 in microsoft.public.win2000.cmdprompt.admin,
msnews.microsoft.com <(E-Mail Removed)> writes
>I'm trying to concatenate over 1000 pdfs together into one large one.
>The util I am using allows me to create my own headings for each pdf as
>it is added to the main pdf (better Table of Contents that way). The
>problem is, it looks like I might end up having to create 30-50 cmd
>files to get it all done, as cmd/command is puking on any command over
>about 2K in size.
>
>Is there any way to increase the buffer size for the commandline input?
>If so, how, and how large can it go?

Probably not if you are using the W2K cmd.exe. Suggestions:
1) The XP cmd.exe is compatible with W2K and has a command line limit of
about 8K;
2) Call the pdf manipulating program (PROG) with the Windows
CreateProcess API. I can think of no reason why that API should have any
limit. YMMV with limits of PROG;
3) Does PROG have the ability to process a file of commands rather than
commands passed directly on the command line?
--
Walter Briscoe
 
Reply With Quote
 
msnews.microsoft.com
Guest
Posts: n/a
 
      30th Sep 2003


Walter Briscoe wrote:
> In message <(E-Mail Removed)> of Mon, 29 Sep 2003
> 23:50:11 in microsoft.public.win2000.cmdprompt.admin,
> msnews.microsoft.com <(E-Mail Removed)> writes
>
>>I'm trying to concatenate over 1000 pdfs together into one large one.
>>The util I am using allows me to create my own headings for each pdf as
>>it is added to the main pdf (better Table of Contents that way). The
>>problem is, it looks like I might end up having to create 30-50 cmd
>>files to get it all done, as cmd/command is puking on any command over
>>about 2K in size.
>>
>>Is there any way to increase the buffer size for the commandline input?
>>If so, how, and how large can it go?

>
> Probably not if you are using the W2K cmd.exe. Suggestions:
> 1) The XP cmd.exe is compatible with W2K and has a command line limit of
> about 8K;


I might need to try this - so I can just copy cmd.exe from an XP system
and run it? That would at least cut the # of .cmd files by a factor of
4. I'd assume I just rename Win2K cmd.exe, copy in the XP version, then
I can doubleclick on a temp.cmd to run it through the "new" XP cmd.exe.
Or would I need to D&D the temp.cmd onto cmd.exe?


> 2) Call the pdf manipulating program (PROG) with the Windows
> CreateProcess API. I can think of no reason why that API should have any
> limit. YMMV with limits of PROG;


I don't know the details on this (not a programmer). Is this decently
covered in a help file?

> 3) Does PROG have the ability to process a file of commands rather than
> commands passed directly on the command line?


Unfortunately, no, that's the first thing I tried. The program is pdcat
from pdf-tools.com. Looking over the commandline help, there is no way
to pull from a file.

An example command, temp.cmd:
d:\programme\pdftools\bin\pdcat -I "Foreword"
".\00\foreward\foreword.pdf" -I "Caution" ".\00\foreward\caution4.pdf"
-I "How to Use This Manual" ".\01\212ie\intrinf4.pdf" blah.pdf

This cats the first 3 files into a file blah.pdf, and puts the Foreword,
Caution, etc as bookmarks for the respective section in blah.pdf.

Someone suggested a FOR loop, but I don't know how to possibly make it
work. Not only would I have to feed each sub-file and its' bookmark
heading in, but I'd have to increment the output filename, and then feed
that new filename in on the next run, so that a new subfile could be
added. I'd have to do this because pdcat won't overwrite a current
file. If you ran the above pdcat command twice, it would create
blah.pdf on the first run, but would exit on the 2nd run without doing
anything since blah.pdf already exists.





 
Reply With Quote
 
BerkHolz, Steven
Guest
Posts: n/a
 
      1st Oct 2003
Will it accept SDTIN?

d:\programme\pdftools\bin\pdcat -I < pdfdata.txt



"msnews.microsoft.com" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> Walter Briscoe wrote:
> > In message <(E-Mail Removed)> of Mon, 29 Sep 2003
> > 23:50:11 in microsoft.public.win2000.cmdprompt.admin,
> > msnews.microsoft.com <(E-Mail Removed)> writes
> >
> >>I'm trying to concatenate over 1000 pdfs together into one large one.
> >>The util I am using allows me to create my own headings for each pdf as
> >>it is added to the main pdf (better Table of Contents that way). The
> >>problem is, it looks like I might end up having to create 30-50 cmd
> >>files to get it all done, as cmd/command is puking on any command over
> >>about 2K in size.
> >>
> >>Is there any way to increase the buffer size for the commandline input?
> >>If so, how, and how large can it go?

> >
> > Probably not if you are using the W2K cmd.exe. Suggestions:
> > 1) The XP cmd.exe is compatible with W2K and has a command line limit of
> > about 8K;

>
> I might need to try this - so I can just copy cmd.exe from an XP system
> and run it? That would at least cut the # of .cmd files by a factor of
> 4. I'd assume I just rename Win2K cmd.exe, copy in the XP version, then
> I can doubleclick on a temp.cmd to run it through the "new" XP cmd.exe.
> Or would I need to D&D the temp.cmd onto cmd.exe?
>
>
> > 2) Call the pdf manipulating program (PROG) with the Windows
> > CreateProcess API. I can think of no reason why that API should have any
> > limit. YMMV with limits of PROG;

>
> I don't know the details on this (not a programmer). Is this decently
> covered in a help file?
>
> > 3) Does PROG have the ability to process a file of commands rather than
> > commands passed directly on the command line?

>
> Unfortunately, no, that's the first thing I tried. The program is pdcat
> from pdf-tools.com. Looking over the commandline help, there is no way
> to pull from a file.
>
> An example command, temp.cmd:
> d:\programme\pdftools\bin\pdcat -I "Foreword"
> ".\00\foreward\foreword.pdf" -I "Caution" ".\00\foreward\caution4.pdf"
> -I "How to Use This Manual" ".\01\212ie\intrinf4.pdf" blah.pdf
>
> This cats the first 3 files into a file blah.pdf, and puts the Foreword,
> Caution, etc as bookmarks for the respective section in blah.pdf.
>
> Someone suggested a FOR loop, but I don't know how to possibly make it
> work. Not only would I have to feed each sub-file and its' bookmark
> heading in, but I'd have to increment the output filename, and then feed
> that new filename in on the next run, so that a new subfile could be
> added. I'd have to do this because pdcat won't overwrite a current
> file. If you ran the above pdcat command twice, it would create
> blah.pdf on the first run, but would exit on the 2nd run without doing
> anything since blah.pdf already exists.
>
>
>
>
>



 
Reply With Quote
 
Herb Martin
Guest
Posts: n/a
 
      1st Oct 2003
Maybe this is a job best done in Perl instead of struggling with batch?

Good enough excuse to learn Perl (and this is a pretty trivial problem in
Perl so a good place to start.)

--
Herb Martin


 
Reply With Quote
 
Al Dunbar [MS-MVP]
Guest
Posts: n/a
 
      4th Oct 2003

"msnews.microsoft.com" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to concatenate over 1000 pdfs together into one large one.
> The util I am using allows me to create my own headings for each pdf as
> it is added to the main pdf (better Table of Contents that way). The
> problem is, it looks like I might end up having to create 30-50 cmd
> files to get it all done, as cmd/command is puking on any command over
> about 2K in size.
>
> Is there any way to increase the buffer size for the commandline input?
> If so, how, and how large can it go?


I don't understand how breaking your script with the excessively long
commands into 30-50 will make the individual commands any shorter. What do
these long commands look like?

If you are making the commands longer using some technique designed to run
more than one command per line, such as separating commands with "&", you
could break them down into separate commands. These could all live happily
in the same script, as I see no reason to make separate ones.

Alternately, if you feel you are going to have to create a bunch of batch
files that are basically similar to each other (I can understand why that
would be no fun!) why not create a master batch file that creates and
executes these on the fly?

/Al


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase length of datagrid as form length increases max.sofia@gmail.com Microsoft Dot NET Framework Forms 1 19th Mar 2008 02:53 PM
RE: How to increase the length limit of mailto links that outlook =?Utf-8?B?TWljaGFlbA==?= Microsoft Outlook Discussion 0 13th Apr 2005 07:39 PM
Re: How to increase the length limit of mailto links that outlook acce Diane Poremsky [MVP] Microsoft Outlook Discussion 1 13th Apr 2005 06:26 PM
Increase Length of Name Box Tim Microsoft Excel Misc 3 26th Jan 2005 07:27 AM
Re: Increase report length SA Microsoft Access Reports 0 15th Apr 2004 07:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:20 PM.