Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a Path
Message
From
08/08/2003 11:25:29
 
 
To
08/08/2003 10:41:11
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00818232
Message ID:
00818271
Views:
19
>Is there a function to fine the path of a file when only the file name in known?

If the program is associated with an extension you could use the FindExecutable API
DECLARE INTEGER FindExecutable IN Shell32 ;
        STRING File, 
        STRING DefaultPath, 
        STRING Exe
lc_buffer = SPACE(254)
IF FindExecutable('my.doc','',@lc_buffer) > 32
   ? lc_Buffer
ENDIF
The file will have to exist, but you could just create a dummy file that has that extension just to find the EXE.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Reply
Map
View

Click here to load this message in the networking platform