Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing a .lnk shortcut
Message
 
To
24/03/2000 14:47:06
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00350104
Message ID:
00350176
Views:
31
>From Load Files
>The function shown below will properly load file names for a particular extension containing multiple periods. It requires the use of the Winfiles class available in the download section of the Universal Thread under Win32 and Other APIs.
>
>* FUNCTION Ld_Files.prg
>I'm not certain if I need to use load files. What I'm trying to do is open a folder on my user's desktop with the files sorted in Date/Time order. I create data and put it where a 3rd party communication program requires to format it for sending to any hand-held computers that connect up. After the hand-helds have sent their delivery or sales information, the program formats that data into a file format that I can send back to my app. The comm program doens't have an API for me to control, so our users have to click the close box after the formating process is completed. Unfortunately, they can close before the process is done and the data is lost. Our tech support group suggested that we open the folder where it puts it's re-formated files and when there are 4 files and none of them have a length of 0K, and they expected 4 files, it's safe to close. I'm working with the developers to see if there is an existing API or one that they might create. But until then, I need another
>solution.
>
>Hope this explains what foolishness I'm trying this time.

Mike,

As I recall the Ld_Files procedure was used to retrieve the link files that reside in one of the special folders. One of the reasons, as I recall, that I included it was that VFP 5.0's ADIR() wouldn't properly retrieve files with more than one period in the file name. For example, if C:\WINDOWS\Desktop\*.lnk was the skeleton, it would miss something like Microsoft Visual FoxPro 6.0.lnk. 6.0 doesn't suffer from this problem. It will return the appropriate file names.

What I'd do, if I understand your problem correctly, would be to use ADIR() to retrieve the necesary information. Copy the contents to another array with the elemenents of the name, size and date/time of last modification and sort it on the date/time.

Does this help?
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform