Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I get short path name in VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00711861
Message ID:
00712063
Views:
10
Dawa,

But you *do* have control over the "abc.tif" portion of the filename, correct? And at runtime you know the long name of the application folder. George and Nancy have suggested that you create a file in that folder...you can give it any name, it is only a temporary file. You can get the short file name from that (since the file now exists), and use justpath() to get the short path name. For example:
lcShortFileName = justpath(lcTempFile) + "\" + "abc.tif"
HTH...

>Nancy,
>
>The application is built in such a way that it feeds to the printer driver file names dynamically based on the current record in a table. The application organizes the files printed into a sub-folder of the application. It is not predictable where the users will install the application. Usually, it would end up in \Program files\company\application folder. That is to say, the sub-folder would be \program files\compay\application\documents. If I have a file named "abc.tif", this is would be the long path: \program files\company\application\documents\abc.tif.
>Therefore, I may very well get a long path and a long file name.
>My application has to be able to convert long path and file names to short ones.
>
>Thanks,
>
>Dawa
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform