tags:

views:

274

answers:

4

Is there any console command "del" to delete files from a folder and put them into Recycle Bin? del command will delete files and not in Recycle Bin.

+1  A: 

Here is a 3rd party program.

http://www.watchingthenet.com/send-deleted-files-to-the-recycle-bin-when-using-windows-command-prompt.html

Note: I have not tried it.

Daniel A. White
OK. it looks like there is no build-in command I can use in batch code.
David.Chu.ca
A: 

cmdutils has a recycle command http://www.maddogsw.com/cmdutils

Delete XP

Delete XP is for deleting files from Command Prompt in Windows (Windows 9x and Windows NT 4.0/2000/XP). Unlike, the standard "DEL" command which only deletes the file, Delete XP deletes the files and sends them to the recycle bin. The file(s) to be deleted are passed to it as parameters. It now supports /p and adds two new options /a /d /v.

Just like del command in Windows NT/2000/XP, Delete XP supports multiple file names as parameters even in Windows 9x. http://downloads.easytools.com/Freebies/DeleteXP.zip ------------------------ http://gearbox.maem.umr.edu/batch/f_w_util/ http://gearbox.maem.umr.edu/batch/f_w_util/recycle.zip C:>recycle /? Version 1.11, Copyright (C)2001 Frank P. Westlake Deletes one or more files by sending them to the Recycle Bin, if possible.

RECYCLE [/PFQ] [/A[[:]attributes]] [[drive:][path]filename

[drive:][path]filename Specifies the file(s) to delete. Specify multiple files by using wildcards. /P Prompts for confirmation before deleting each file. /F Force deleting of read-only files. /Q Quiet mode, do not ask if ok to delete on global wildcard /A Selects files to delete based on attributes attributes R Read-only files S System files H Hidden files A Files ready for archiving - Prefix meaning not

BTW if you want to empty the recylce bin from the command

Chris
A: 

A bat script that issues a copy and del would be a simple solution...

Niels Castle
A: 

Hi Niels, Ho wdo you use "copy" to put a file in the Recycle bin ?

Olivier