Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending a file with spaces in the name to Recycle bin...
Message
 
 
À
05/02/2008 01:13:39
Chris Sund
Silhouette Solutions
Utah, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01289425
Message ID:
01289498
Vues:
9
Chris,

Please see Choosing between Macro substitution and Name expressions FAQ #7841

>Hello,
>
>Can anyone point me to a thread, or give me some advice on how to send a file to the recycle bin. I was using...
>
>
>Delete File &jfile RECYCLE
>
>
>But it won't delete properly if there are spaces in the name. I found the following code to delete something with spaces, but it deletes the item permanately. There's no recourse if the user makes a mistake. Any help is appreciated.
>
>
>
>#Define CREATE_ALWAYS                  2
>#Define FILE_ATTRIBUTE_NORMAL        128
>
>Declare Integer DeleteFile In kernel32;
>	STRING lpFileName
>
>Declare Integer CreateFile In kernel32;
>	STRING  lpFileName,;
>	INTEGER dwDesiredAccess,;
>	INTEGER dwShareMode,;
>	INTEGER lpSecurityAttributes,;
>	INTEGER dwCreationDisposition,;
>	INTEGER dwFlagsAndAttributes,;
>	INTEGER hTemplateFile
>
>Declare Integer CloseHandle In kernel32 Integer hObject
>
>
>Local lpFileName
>
>lpFileName='c:\my test.tmp'
>= DeleteFile (lpFileName)
>
>
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform