Board index » delphi » How to retrieve long path name from short path name
Ulysse
![]() Delphi Developer |
Sat, 29 Jan 2000 03:00:00 GMT
|
Ulysse
![]() Delphi Developer |
Sat, 29 Jan 2000 03:00:00 GMT
How to retrieve long path name from short path nameHi, How can I retrieve the long path name like this: Thanks in advance. |
vvija
![]() Delphi Developer |
Sat, 29 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameUlysses <wai...@hkstar.com> wrote in article Quote> Hi, You may use the GetFullPathName( ) API to retrieve the full path given a For further information refer to online help. Hope this helps -- V.VijayaRaghvan Quote |
Dave Brosi
![]() Delphi Developer |
Sat, 29 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameThere's probably an easier way, but you probably could use FindFirstFile dave Quote> But W95 pass a short path name like this: dave. dbros...@chesco.com --please email visit me at http://www.chesco.com/~dbrosius/bs.html |
Ross Smit
![]() Delphi Developer |
Sun, 30 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameQuoteUlysses wrote: since it only returns the last component of the file name, you have to call it repeatedly for each directory in the path. Here's the function I wrote to handle this: Quote> string LongFileName(const string& short_file_name) { Ross Smith ............................. <mailto:ross.sm...@nz.eds.com> Internet and New Media, EDS (New Zealand) Ltd., Wellington, New Zealand "The first thing we do, let's kill all the language lawyers." -- Henry VI Part II, by W. Shakespeare; additional dialogue by B. Stroustrup |
Raymond Chen [M
![]() Delphi Developer |
Sun, 30 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path name1. Use FindFirstFile on each component to convert it from short 2. Convert the filename to an ITEMIDLIST, then use -- |
Chris Marriot
![]() Delphi Developer |
Sun, 30 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameIn article <01bca7b0$a645b480$a80c36ca@nquest59>, vvijay Quote>Hi Ulysses "GetFullPathName" converts a short pathname into a long pathname, you're sadly mistaken. The purpose of "GetFullPathName" is to convert a "partial path" such as As someone had already said, the correct way to convert a "short path" Chris ---------------------------------------------------------------- |
Joseph Partridg
![]() Delphi Developer |
Mon, 31 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameThis is a multi-part message in MIME format. --------------37BDE92BFC559C3CB4E3D63F QuoteDave Brosius wrote: The GetFullPathName function retrieves the full path and filename of a DWORD GetFullPathName( -- --------------37BDE92BFC559C3CB4E3D63F <HTML> QuoteDave Brosius wrote: could use FindFirstFile <BR>and get the alternate name. <P>dave <P>> But W95 pass a short path name like this: <P>-- <P><TT>The GetFullPathName function retrieves the full path and filename <P><TT>DWORD GetFullPathName(</TT> <P>-- --------------37BDE92BFC559C3CB4E3D63F-- --------------114A7CEE5947EFC151159304 begin: vcard --------------114A7CEE5947EFC151159304-- |
Jan Oo
![]() Delphi Developer |
Mon, 31 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameRaymond Chen [MS] (raymo...@microsoft.com.---) wrote: : 2. Convert the filename to an ITEMIDLIST, then use : -- Does the second solution also needs to do per component?? I have made a routine in Delphi3 that converts a short filepath to long. But Isn't there a standard routine who gives me the x dir of a path? and why did those Microsoft boys didn't give us a opposite routine of Let me know if anybody made a bulletproof short UNC/non UNC path to LongPath converter! Greetings Jan Oonk |
Chris Marriot
![]() Delphi Developer |
Mon, 31 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameIn article <33F298A0.3E52C...@totcon.com>, Joseph Partridge Quote>I am very surprised to hear this answer from someone that works at "GetFullPathName" function actually does. It is *not* the "opposite" of "GetShortPathName". As Ray correctly said, using "FindFirstFile" on each component of the name is the right answer. Chris ---------------------------------------------------------------- |
Joseph Partridg
![]() Delphi Developer |
Mon, 31 Jan 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameThis is a multi-part message in MIME format. QuoteRaymond Chen [MS] wrote: Microsoft. Just use the GetFullPathName function. -- --------------D346EB7B9A00AB8B2DBE45AA begin: vcard --------------D346EB7B9A00AB8B2DBE45AA-- |
Phillip Crew
![]() Delphi Developer |
Tue, 01 Feb 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameWill using SHGFI_DISPLAYNAME exclude the file extension if specified in QuoteTarkan Yetiser wrote: Kind regards, ** ThumbsPlus 3.0g1 is now available from our Web site ** |
Joseph Partridg
![]() Delphi Developer |
Tue, 01 Feb 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameThis is a multi-part message in MIME format. QuoteChris Marriott wrote: attention to the online help. -- --------------A477F637882FDF35517CD551 begin: vcard --------------A477F637882FDF35517CD551-- |
Joseph Partridg
![]() Delphi Developer |
Tue, 01 Feb 2000 03:00:00 GMT
Re:How to retrieve long path name from short path nameThis is a multi-part message in MIME format. QuoteJan Oonk wrote: Quote> I have made a routine in Delphi3 that converts a short filepath to to write a function to convert a short path to a long one. -- --------------49E2A5533D45B10CC14011E2 begin: vcard --------------49E2A5533D45B10CC14011E2-- |
Ken Freema
![]() Delphi Developer |
Tue, 01 Feb 2000 03:00:00 GMT
Re:How to retrieve long path name from short path name I just implemented a solution using Raymond's second static CString GetFullPath(LPCTSTR pszShortPath) // convert the short path to an IDL hRes = // convert the IDL to the full path Quote} ParseDisplayName(), and if so, how? Ken Raymond Chen [MS] wrote in article Quote>1. Use FindFirstFile on each component to convert it from Quote>".---" to get my real address. I do this on my own time |
Ken Freema
![]() Delphi Developer |
Tue, 01 Feb 2000 03:00:00 GMT
Re:How to retrieve long path name from short path name Just answered my own question: I need to use SHGetMalloc to IMallocPtr pMalloc; Ken Freeman wrote in article ... Quote> I just implemented a solution using Raymond's second |
1. Converting Long Format Path to Short Format Path
2. Short File Name from Long File Name.
4. TTable.CreateTable - Long path names on Novell
5. Long path names and Borland C++ installation
7. How to convert Long file name to short
8. D1- Convert Long to Short File Names