Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How recover a file from WINDOWS RECYCLE BIN
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00197963
Message ID:
00198497
Views:
20
>Hi Barbara
>
>Thanks for your answer.
>I wanted to use recyle bin cos' I always tend to use operating system possibilities (moving files to it is quick) and I don't want to use dos command ( RUN move /y file1 file2 ).
>Waiting for an answer, I made it allready in my own way. It seems quite simple but it is not moving but copying and deleting.
>Now I have another question. You wrote that you move files. Is a way to really move files using only vfp commands (not by copying source to target and deleteting source), like moving files to WINDOWS RECYCLE BIN (erase xxx recycle). Copying requiers for a moment additional space. Do you use dos 7 command " move /y ".

There are several ways to do this. You can use the Win32 API; a single call to MoveFile() or MoveFileEx() can be used to rename or move a file to a different location on the same partition. If you use the Windows Scripting Host, the Scripting.FileSystemObject (see the MSDN topic FileSystemObject Object) can move, delete, rename files and folders. It's a powerful Automation Server that works well with VFP (as do all the automation components of the WSH.)

>Greetings.
>
>>Jozef,
>>I don't know about the Recycle bin, but I'd move all the 'deleted' files to a temp directory until ALL of the operation is complete. Then the LAST step would be to delete the files you moved. That way they will always be available if needed.
>>
>>Barbara
>>
>>>Hi All !
>>>I have in my program an operation that have to delete several files but if last step of that operation fails, I have to recover all files.
>>>If I erase a file to WINDOWS RECYCLE BIN ( erase xxx.dbf recycle)
>>>can I easy recover this file (programaticly from within VFP5 !) or have I made my own recycle bin.
>>>Greetings !
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform