DOCUMENT:Q155081  24-AUG-1999  [foxpro]
TITLE   :HOWTO: Send Files to the Recycle Bin
PRODUCT :Microsoft FoxPro
PROD/VER:
OPER/SYS:
KEYWORDS:kbvfp500 kbvfp600

======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Visual FoxPro for Windows, versions 5.0, 6.0 
-------------------------------------------------------------------------------

SUMMARY
=======

The ERASE and DELETE FILE commands can be used to programmatically delete a file
or files. In previous versions of FoxPro, the ERASE and DELETE FILE commands
would always permanently delete the files from disk. However, in Visual FoxPro
version 5.0, the ERASE and DELETE FILE commands have an optional RECYCLE clause
that will place the files in the Windows 95 or Windows NT 4.0 Recycle Bin.

MORE INFORMATION
================

The following example uses the ERASE command to place a file in the Recycle
Bin:

      ERASE Test.txt RECYCLE

The following example uses the DELETE FILE command to place a file in the Recycle
Bin:

      DELETE FILE Test.txt RECYCLE

NOTE: The RECYCLE clause is ignored under Windows NT 3.51. Files are always
permanently deleted under Windows NT 3.51.

Additional query words:

======================================================================
Keywords          : kbvfp500 kbvfp600 
Technology        : kbVFPsearch kbAudDeveloper kbVFP500 kbVFP600
Issue type        : kbhowto

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1999.