Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


move a file to the recycle bin

 

'move a file to the recycle bin

Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Long
hNameMappings As Long
lpszProgressTitle As Long
End Type
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Const FO_DELETE = &H3
Private Const FOF_ALLOWUNDO = &H40

Dim typOperation As SHFILEOPSTRUCT

With typOperation
.wFunc = FO_DELETE
.pFrom = "filename.txt" 'File to move to bin
.fFlags = FOF_ALLOWUNDO
End With
SHFileOperation typOperation

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Browser info(ASP.net)
Pop up example(Javascript)
shutdown or restart(VB)
SCREENSAVER ACTIVE(VB)
hexadecimal to decimal conversion function(Javascript)
wmi and soundcard(VB)
Display memory size and location(Powershell)
check a file exists(php)

    




Copyright © 2003 by programmershelp.co.uk