Getting DOS 8.3 path from Windows long file name 
Author Message
 Getting DOS 8.3 path from Windows long file name

I need to convert a Windows long filename to the 16 short version?  Is there
a way to do this from VBA.
Ex.
c:\data drive\my access files\file.mdb
to
c:\data~1\my~2\file.mdb

--
Please respond to the newsgroup AND the author:

Thanks
Shawn



Sat, 15 Dec 2001 03:00:00 GMT  
 Getting DOS 8.3 path from Windows long file name

Quote:

> I need to convert a Windows long filename to the 16 short version?  Is there
> a way to do this from VBA.
> Ex.
> c:\data drive\my access files\file.mdb
> to
> c:\data~1\my~2\file.mdb

> --
> Please respond to the newsgroup AND the author:

> Thanks
> Shawn

 http://home.att.net/~dashish/api/api0020.htm on Dev's site might be a solution
for you....

--
HTH
-------------------------
| gHaD (Aaron Robinson) |
|MJM-PC Solutions, Inc. |
|      Chicago, IL      |
-------------------------



Sat, 15 Dec 2001 03:00:00 GMT  
 Getting DOS 8.3 path from Windows long file name
Check the Knowledge Base article:
HOWTO: Get a Short Filename from a Long Filename
available at:
http://support.microsoft.com/support/kb/articles/q175/5/12.asp

--Sue

On Tue, 29 Jun 1999 16:12:51 -0700, "Shawn Moorman"

Quote:

>I need to convert a Windows long filename to the 16 short version?  Is there
>a way to do this from VBA.
>Ex.
>c:\data drive\my access files\file.mdb
>to
>c:\data~1\my~2\file.mdb



Sun, 16 Dec 2001 03:00:00 GMT  
 Getting DOS 8.3 path from Windows long file name

Quote:

>I need to convert a Windows long filename to the 16 short version?  Is
there
>a way to do this from VBA.
>Ex.
>c:\data drive\my access files\file.mdb
>to
>c:\data~1\my~2\file.mdb

Hi Shawn,

to convert a long filename to a 8.3 one, you do the following

Take the first 6 characters (no spaces) add a ~ and then 1 for the first
one, 2 for the second etc

For example:

'long filename one.txt'    -->  longfi~1.txt
'long fil two.txt'                 -->  longfi~2.txt
'Long fileo.txt'                  -->  longfi~3.txt
'long fal.txt'                       -->  longfa~1.txt

HTH



Sun, 16 Dec 2001 03:00:00 GMT  
 Getting DOS 8.3 path from Windows long file name

Hi,
This is Not recommended
What if you have
\Microsoft Fantastic Program
\Microsoft Not so Fantastic Program
Better to use the API call .. ;-)

Quote:


> >I need to convert a Windows long filename to the 16 short version?  Is
> there
> >a way to do this from VBA.
> >Ex.
> >c:\data drive\my access files\file.mdb
> >to
> >c:\data~1\my~2\file.mdb

> Hi Shawn,

> to convert a long filename to a 8.3 one, you do the following

> Take the first 6 characters (no spaces) add a ~ and then 1 for the first
> one, 2 for the second etc

> For example:

> 'long filename one.txt'    -->  longfi~1.txt
> 'long fil two.txt'                 -->  longfi~2.txt
> 'Long fileo.txt'                  -->  longfi~3.txt
> 'long fal.txt'                       -->  longfa~1.txt

> HTH

--
Regards
Pieter Wijnen


http://www.thuleeng.com

Tough guys don't take backup - tough guys cry a lot..

Good site to look for Access answers is Dev's site:
 http://home.att.net/~dashish
Also The Paradox Access Website:
 http://www.pcltd.co.uk/access/

  wijnen.vcf
< 1K Download


Mon, 17 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. converting long file names into 8.3 Dos with VB5

2. How to get short DOS 8.3 file names from long filenames

3. vb4: getting 8.3 filename from long file name

4. 8.3 file name to Long file name

5. Long file names to 8.3 File names convertion

6. Expand dos 8.3 path to windows style

7. Convert Long File Name to 8.3 Notation

8. ODBC to CSV Text files Fails if name longer than 8.3

9. App.path is 8.3 or long?

10. HELP, I need to convert VB5 long filename back to DOS 8.3 format

11. App.path is 8.3 or long?

12. VB Opening Long Name Project with 8.3

 

 
Powered by phpBB® Forum Software