A
Adam S
Hi,
with a few thousand lines worth of Perl programmnig in a Unix
environment behind me I want to create an application in Windows where
I can mark several files and then right-click and do a "Send To" to a
perl application.
When using the "Send To" right-click menu item, all the files I've
marked are supplied on the command line to the executable i.e.
myexecutable file1.txt file2.txt ... fileN.txt
I create my executable by writing a .bat file which in turn supplies
the input argument with a
eval "perl myperlscript.pl @ARGS" statement.
My first version of myperlscript.pl only printed all the file names
supplied to to stdout just to check how many files I can do.
That's where the problem arises, somewhere along the line it only
manages about 5 files (the path names are rather long, about 50
characters.
Somewhere the command line gets very short, I don't exactly know
where, if itäs the .bat command line that's too short or the perl
command line.
Other "proper" applications, such as gVim, don't seem to have a
problem with 50 similar file names being supplied.
If the solution is to create a perlscript.exe, how do I do that so I
can get rid of the .bat file to launch the perl interpreter? In a Unix
environment I would just add a #!/usr/bin/perl and the script itself
would be an executable, but how do I do it in Windows without
involving a .bat file? Or is there an entirely different solution
where I can do a #! like addition to my script?
Thankful for any help.
Best Regards,
Adam
with a few thousand lines worth of Perl programmnig in a Unix
environment behind me I want to create an application in Windows where
I can mark several files and then right-click and do a "Send To" to a
perl application.
When using the "Send To" right-click menu item, all the files I've
marked are supplied on the command line to the executable i.e.
myexecutable file1.txt file2.txt ... fileN.txt
I create my executable by writing a .bat file which in turn supplies
the input argument with a
eval "perl myperlscript.pl @ARGS" statement.
My first version of myperlscript.pl only printed all the file names
supplied to to stdout just to check how many files I can do.
That's where the problem arises, somewhere along the line it only
manages about 5 files (the path names are rather long, about 50
characters.
Somewhere the command line gets very short, I don't exactly know
where, if itäs the .bat command line that's too short or the perl
command line.
Other "proper" applications, such as gVim, don't seem to have a
problem with 50 similar file names being supplied.
If the solution is to create a perlscript.exe, how do I do that so I
can get rid of the .bat file to launch the perl interpreter? In a Unix
environment I would just add a #!/usr/bin/perl and the script itself
would be an executable, but how do I do it in Windows without
involving a .bat file? Or is there an entirely different solution
where I can do a #! like addition to my script?
Thankful for any help.
Best Regards,
Adam