[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-users
Subject:    RE: MSDOS Name for files
From:       "Joe Schell" <jschell () peakss ! com>
Date:       2000-09-29 16:40:05
[Download RAW message or body]



> From: Mike Wisniewski [mailto:wisniew@rea-alp.com]
>
>
> Yes it is visable IE.

Are you using NT?  If so what name appears in the right click properties box
under 'MS-DOS name'?

>
> Win32::GetShortPathName($f) returns nothing on almost all of the special
> character file names.
>

Nothing?  You mean it returns and empty string or a undef?

> I did run the supplied code and it return unitialized values.
>

I got the following from the MSDN library

	When an application calls this function
	and specifies a path on a volume that
	does not support 8.3 aliases, the
	function fails with ERROR_INVALID_PARAMETER
	if the path is longer than 67 bytes.

It doesn't say what happens if it less than 67 bytes.

> -----Original Message-----
> Behalf Of Joe Schell
>
>
>
> > Behalf Of Mike Wisniewski
> >
> >
> > Does anyone have any easy ideas on how to get the DOS name for files.
> > Win32::GetShortPathName($location) does not work because of the
> files use
> > Macintosh character sets and Windows and Perl looks at them in
> > two different
> > ways, either as a block and displays as a ? mark.
> >
>
> Are you saying Win32::GetShortPathName() fails - it produces an error
> message?
>
> Is the file visible in IE?
>
> Did you try the following?
>
> 	my $n = Win32::GetShortPathName($f);
> 	print "$n\n";
>
> 	my $len = length($n);
> 	for (my $i=0; $i < $len; $i++)
> 		{
> 		printf("%2.2x", ord($n));
> 		$n =~ s/^.//;
> 		}
>
> To verify exactly what characters are being returned?

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic