1. Help: How do I convert LFN to truncated 8.3?

Hello Euphorians,

Does anyone here how to convert long file name paths to truncated DOS 8.3 names
using Euphoria code? I want to supply a LFN string and use a function that would
return the truncated 8.3 equivelent.

Eg:

Input = "C:\\Documents and Settings\\Vincent\\Foo.e" (LFN)
Output = "C:\\DOCUME~1\\VINCENT\\FOO.E" (DOS 8.3)

I dont wish to use a LFN library in this case for compatability reasons.

Thanks in advance for any help.


Regards,
Vincent

new topic     » topic index » view message » categorize

2. Re: Help: How do I convert LFN to truncated 8.3?

Vincent wrote:
> 
> Hello Euphorians,
> 
> Does anyone here how to convert long file name paths to truncated DOS 8.3
> names
> using Euphoria code? I want to supply a LFN string and use a function that
> would
> return the truncated 8.3 equivelent.
> 
> Eg:
> 
> Input = "C:\\Documents and Settings\\Vincent\\Foo.e" (LFN)
> Output = "C:\\DOCUME~1\\VINCENT\\FOO.E" (DOS 8.3)
> 
> I dont wish to use a LFN library in this case for compatability reasons.
> 
> Thanks in advance for any help.
> 
> 
> Regards,
> Vincent

Hi Vincent,

It's amazing how many resources a search will turn up...  For Windows questions,
I add site:microsoft.com to my searches.

http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_rbrx.asp

Is this the kind of info you are looking for?  Or are you looking to know what
Windows would do with any given file on any given version with any given path
containing any given existing files without simply using the Windows API?

-- Brian

new topic     » goto parent     » topic index » view message » categorize

3. Re: Help: How do I convert LFN to truncated 8.3?

V> Does anyone here how to convert long file name paths to truncated
V> DOS 8.3 names using Euphoria code? I want to supply a LFN string
V> and use a function that would return the truncated 8.3 equivelent.

V> Eg:

V> Input = "C:\\Documents and Settings\\Vincent\\Foo.e" (LFN)
V> Output = "C:\\DOCUME~1\\VINCENT\\FOO.E" (DOS 8.3)

V> I dont wish to use a LFN library in this case for compatability reasons.

V> Thanks in advance for any help.

Use the kernel32 function:

long GetShortPathNameA(string, string, long)

new topic     » goto parent     » topic index » view message » categorize

4. Re: Help: How do I convert LFN to truncated 8.3?

Brian Broker wrote:

> Hi Vincent,
> 
> It's amazing how many resources a search will turn up...  For Windows
> questions,
> I add site:microsoft.com to my searches.
> 
> <a
> href="http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_rbrx.asp">http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_rbrx.asp</a>
> 
> Is this the kind of info you are looking for?  Or are you looking to know what
> Windows would do with any given file on any given version with any given path
> containing any given existing files without simply using the Windows API?
> 
> -- Brian

Hi Bryan,

That helps thanks.


Regards,
Vincent

new topic     » goto parent     » topic index » view message » categorize

5. Re: Help: How do I convert LFN to truncated 8.3?

Vincent wrote:
> 
> Brian Broker wrote:
> 
> > Hi Vincent,
> > 
> > It's amazing how many resources a search will turn up...  For Windows
> > questions,
> > I add site:microsoft.com to my searches.
> > 
> > <a
> > href="http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_rbrx.asp">http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_rbrx.asp</a>
> > 

Do you know the link for Windows 2000?

> > Is this the kind of info you are looking for?  Or are you looking to know
> > what
> > Windows would do with any given file on any given version with any given
> > path
> > containing any given existing files without simply using the Windows API?
> > 
> > -- Brian
> 
> Hi Bryan,
> 
> That helps thanks.
> 
> 
> Regards,
> Vincent

new topic     » goto parent     » topic index » view message » categorize

6. Re: Help: How do I convert LFN to truncated 8.3?

don cole wrote:
> 
> Vincent wrote:
> > 
> > Brian Broker wrote:
> > 
> > > Hi Vincent,
> > > 
> > > It's amazing how many resources a search will turn up...  For Windows
> > > questions,
> > > I add site:microsoft.com to my searches.
> > > 
> > > <a
> > > href="http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_rbrx.asp">http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_rbrx.asp</a>
> > > 
> 
> Do you know the link for Windows 2000?

yes

> 
> > > Is this the kind of info you are looking for?  Or are you looking to know
> > > what
> > > Windows would do with any given file on any given version with any given
> > > path
> > > containing any given existing files without simply using the Windows API?
> > > 
> > > -- Brian
> > 
> > Hi Bryan,
> > 
> > That helps thanks.
> > 
> > 
> > Regards,
> > Vincent

No problem... and you almost spelled my name correctly!  I guess my signature
must have been too close to your greeting.

to don:
google: "windows 2000 long file names site:microsoft.com"

Regards,
-- BrIan

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu