delorie.com/archives/browse.cgi | search |
From: | "Sven-Erik Bak" <seb AT techno-matic DOT dk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | How do I get the msdos "long" (x~1.y) filename when I know the real windows long filename |
Lines: | 31 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2919.6600 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2919.6600 |
Message-ID: | <M9lv5.421$Tn3.8133@news010.worldonline.dk> |
Date: | Tue, 12 Sep 2000 07:44:44 GMT |
NNTP-Posting-Host: | 212.54.85.244 |
X-Complaints-To: | news-abuse AT wol DOT dk |
X-Trace: | news010.worldonline.dk 968744684 212.54.85.244 (Tue, 12 Sep 2000 09:44:44 MET DST) |
NNTP-Posting-Date: | Tue, 12 Sep 2000 09:44:44 MET DST |
Organization: | Customer of World Online |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
I am looking for a way to get the dos filename, when i know the long filename. I have tried the findfirst and findnext command, with the "_crt0_startup_flags |= _CRT0_FLAG_NO_LFN" flag on. As long as you only use wildcards like "*.c" ec. it works and returns the short dos name, But if you enter the full long name it can't find the file. Is there a command that says "get_short(filename)" and returns the short filename that is actually used in dos. I have tried the "_lfn_gen_short_fname();" in the library but this is the result "_lfn_gen_short_fname();" THISISALONG.NAME -> THISISAL.NAM Dos interpretation THISISALONG.NAME -> THISIS~1.NAM Hope that sombody has the answer, and thankyou. Best regards ************************* Sven-Erik Bak Techno-matic A/S seb AT techno-matic DOT dk *************************
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |