|
Answer» hi is there a way to delet files and folders but send them to recycle bin instead of direct delet? by the way it should be done with a batch file if its possible thanks This isn't possible in Batch, its just Direct Deletioni always thought recycle bin is a folder or part of partitionIt is a kind of folder but in CMD and Batch, Recycle Bin doesn't exist or show up.Code: [Select]C:\>dir /AS
Katalog: C:\
2009-05-21 19:19 <DIR> $Recycle.Bin 2009-05-22 05:08 <DIR> Boot 2009-04-22 07:28 383200 bootmgr 2009-05-22 05:08 8192 BOOTSECT.BAK 2006-11-02 17:41 <JUNCTION> DOCUMENTS and Settings [C:\Users] 2009-05-28 20:09 4293435392 hiberfil.sys 2009-05-28 20:09 6437208064 pagefile.sys 2009-05-28 20:30 <DIR> System Volume Information hmm i have it The Recycle Bin is not a real folder. Command line Del does not know about the Recycle Bin. You would need a 3rd party util such as recycle.exe from
http://www.maddogsw.com/cmdutils/
or this one
http://www.geocities.com/fp.westlake/nt/recycle.zip
Or you can write a VB program to get at the Windows API. ok thanks i downloaded Recycle.exe from above link and copied it NEXT to my.bat file now i need some scripts to send my files to recycle bin instead of direct deletion can someone help? if its possible give me an example thanksJust as a suggestion, MOVE Recycle.exe to your system32 folder under you Windows folder, that way all batch scripts on your computer can use it without having a seperate copy of Recycle in that same folder.
Try this script:
Code: [Select]@ECHO off Recycle FiletosendtoBin.txt pause thanks macdad
its working like a machine thanks
|