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.
If you are having trouble in deleting any file or folder directly by right-clicking, then you can delete it using cmd. The commands below delete the specific file or folder and place them in the recycle bin: del. rmdir.
The del command displays the following prompt: Are you sure (Y/N)? To delete all of the files in the current directory, press Y and then press ENTER. To cancel the deletion, press N and then press ENTER.
To delete a file, use the following command: del "<filename>" . For example, to delete Test file. txt , just run del "Test File. txt" .
The del command is a Command Prompt command used to delete files. Various command options are available so that you can remove files that have a certain file extension, delete every file in a folder, get rid of only the files with certain file attributes, and more.
There is a "recycle.exe" command part of the a collection called cmdutils
"Recycle.exe is a safe replacement for the DEL command, that sends files to the recycle bin instead of deleting them. Recycle is also more flexible than DEL; you can specify multiple files at once (or use wildcards)"
Available at http://www.maddogsw.com/cmdutils
(Tool last updated May 2000)
There is "DeleteXP.exe" 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.
Available at http://downloads.easytools.com/Freebies/DeleteXP.zip
(Tool last updated Sep 2004)
There is "recycle.exe" (different developer to one from maddogsw):
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
Available at http://web.archive.org/web/20071026113307/http://gearbox.maem.umr.edu/batch/f_w_util/
http://gearbox.maem.umr.edu/batch/f_w_util/
http://gearbox.maem.umr.edu/batch/f_w_util/recycle.zip
(Tool last updated Jan 2001)
BTW if you want to empty the recylce bin from the command line "cmdutils" has "bin" command:
bin /empty /force
Without external programs - deleteJS.bat
. It uses Shell.Application
invoke verb method. usage is simple:
call deleteJS.bat c:\someFile.txt call deleteJS.bat d:\someFolder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With