Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending a file with spaces in the name to Recycle bin...
Message
 
 
To
05/02/2008 01:13:39
Chris Sund
Silhouette Solutions
Utah, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01289425
Message ID:
01289498
Views:
8
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform