Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FIle handling with the API
Message
De
14/02/2002 11:37:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00620086
Message ID:
00620098
Vues:
13
>I'm running into some road blocks dealing with files and the API. I've only been looking at the API for about a week, now, so these may be simplistic questions. But all my searching isn't finding an answer.
>
>The first thing is with copying files with SHFileOperation. I can get the files to copy fine unless they are locked by another application. I realize that I won't be able to copy them in that case, but I'd like to intercept the error message instead of having it put up a messagebox. Is this possible to do? I would like to get the file name as well as the error since I'm copying multiple files at a time.
>
>Also with SHFileOperation, is there any way to get a percentage copied as it's copying? Like some sort of feedback after each file is copied like the DynaZip control does? I'd like to use my own progress bar instead of the built in one.
>
>My other problem is with reading directories. Since VFP ignores hidden files, I'm looking for another way to do it. Nadya posted some code on this on another thread, but it talks about scripting and I'm thinking that uses the WSH. Unfortunately, I can't rely on that being installed. Is there a way to load a directory using the API? I searched MS's site, but couldn't find any commands in there to do it. I did find FindFirstFile and FindNextFile, and thought I might be able to get a whole directory that way, but I didn't know if that would be slower. The example code is pretty Greek to me since I don't know C. Is there any examples on how to do this with VFP already? I didn't see anything in the API section here on the UT.
>
>Thanks,


Michelle,

adir(xx,'\tmp\in\*.*', 'DHS') works for me with hidden files

for examples (adir, FindFirstFile, FindFirstFile, ...) look in Download for
Folder-and-File related API-based functions
The code is clear. If you have any questions, let me know
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform