PARAMSTR(1) as long filename 
Author Message
 PARAMSTR(1) as long filename

Hello

I am looking for a unit or any solution to use paramstr variable
for long filenames. for example to make an EXE file from a Pascal source
that can handle this syntax (for example if the executable program name
is prog.exe):

prog "this is a long filename.ext as paramstr(1) variable" "this is 2nd"

Is it possible in Turbo pascal 7.0?
Thank you
Joe



Wed, 18 Jun 1902 08:00:00 GMT  
 PARAMSTR(1) as long filename

Quote:

> I am looking for a unit or any solution to use paramstr variable
> for long filenames. for example to make an EXE file from a pascal source
> that can handle this syntax (for example if the executable program name
> is prog.exe):

> prog "this is a long filename.ext as paramstr(1) variable" "this is 2nd"

You could do it manually. If the first character of the first parameter is a
", read all the following paramters until the last character is again a ".


Wed, 18 Jun 1902 08:00:00 GMT  
 PARAMSTR(1) as long filename
Joseph Szadai schrieb:

Quote:
> prog "this is a long filename.ext as paramstr(1) variable" "this is 2nd"

> Is it possible in Turbo pascal 7.0?

Yes, it is. Have a look on my homepage
http:/home.t-online.de/home/andreas.killer/ at the LFN-unit.

But note, it is not possible to pass a long filename with the explorer
to a dos-program. On some windows-systems this feature is avaible, but
on most systems not...I don't have any solutions for this problem.

By, Andreas.



Wed, 18 Jun 1902 08:00:00 GMT  
 PARAMSTR(1) as long filename
On Fri, 05 Nov 1999 21:13:16 +0100, Frederic Bonroy
Quote:


>> I am looking for a unit or any solution to use paramstr variable
>> for long filenames. for example to make an EXE file from a pascal source
>> that can handle this syntax (for example if the executable program name
>> is prog.exe):
>> prog "this is a long filename.ext as paramstr(1) variable" "this is 2nd"
>You could do it manually. If the first character of the first parameter is a
>", read all the following paramters until the last character is again a ".

Won't work 100% of the time.  It will fail on multiple embedded
spaces; i.e. "my(space)(space)(space)file.txt"
You need to read the full command line and parse it yourself.

Speaker to Animals

http://www.kzin.com



Wed, 18 Jun 1902 08:00:00 GMT  
 PARAMSTR(1) as long filename


Wed, 18 Jun 1902 08:00:00 GMT  
 PARAMSTR(1) as long filename

Quote:

> Joseph Szadai schrieb:

> > prog "this is a long filename.ext as paramstr(1) variable" "this is 2nd"

> > Is it possible in Turbo pascal 7.0?
> Yes, it is. Have a look on my homepage
> http:/home.t-online.de/home/andreas.killer/ at the LFN-unit.

> But note, it is not possible to pass a long filename with the explorer
> to a dos-program. On some windows-systems this feature is avaible, but
> on most systems not...I don't have any solutions for this problem.

With the TOpenFilename-Dialog with some Windows-versions it is also
possible to pass long filenames to a 16-bit Pascal program:
You have to OR the flags of the TOpenFilName with $00200000
(found in a unit from Eyal Doron in the SWAG).
It works with Windows 98 but only with filenames without blanks.
For filenames with blanks it returnes only the short filename.
With WinNT4.0 TOpenFileName it returns always only short filenames.

Does anybody know a solution which supports also long filenames
with blanks and works with NT4?

Bye,
Hans



Wed, 18 Jun 1902 08:00:00 GMT  
 PARAMSTR(1) as long filename


Wed, 18 Jun 1902 08:00:00 GMT  
 PARAMSTR(1) as long filename


Quote:

>Hello

>I am looking for a unit or any solution to use paramstr variable
>for long filenames. for example to make an EXE file from a pascal source
>that can handle this syntax (for example if the executable program name
>is prog.exe):

>prog "this is a long filename.ext as paramstr(1) variable" "this is 2nd"

>Is it possible in Turbo pascal 7.0?

You can get the entire original command line using something like
this:

var
  CommandLine : ^string

BEGIN
  CommandLine := (ptr (prefixseg,$80));
  writeln CommandLine^;
END.

From there, you'd have to make your own routine to parse it. But I
don't think TP7 understands LFN's anyway, so this may not be of any
help to you.

Regards,
Jim Wilson
(Cheap spam protection in place: remove the 'SpamThis'
from my email ID to reply to me personally)



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Long FileName - Short Filename conversion

2. Long filenames in DOS mode

3. extend borland pascal to long filenames and use of win95/98/me/xp filedialogs

4. lfn110.zip TP6+ Support of long filenames

5. BDE Bug with long filenames ?

6. Long Filenames

7. BP7 / Long Filenames LFN

8. Erase Function for Win95 Long Filenames

9. unit dos and long filenames with windows95

10. long filenames under BP7.0 ?

11. Long FileNames

12. Long filenames problem

 

 
Powered by phpBB® Forum Software