Recycling from command line

R

Rich Pasco

This should be an easy one:

The command-line "del" command immediately deletes a file.
Is there a command-line command that puts a file into the
recycle bin instead, just as if it were sleeted in Explorer
and the Del key struck?

- Rich
 
J

John John

Rich said:
This should be an easy one:

The command-line "del" command immediately deletes a file.
Is there a command-line command that puts a file into the
recycle bin instead, just as if it were sleeted in Explorer
and the Del key struck?

No, not natively. You would have to use the MOVE command or use a
third party tool.

John
 
R

Rich Pasco

I asked,
The command-line "del" command immediately deletes a file.
Is there a command-line command that puts a file into the
recycle bin instead, just as if it were selected in Explorer
and the Del key struck?

and John John answered,
No, not natively. You would have to use the MOVE command or use a
third party tool.

Thanks, John. Could you elaborate? I doubt that simply MOVEing a file
into C:\RECYCLER (or one of its subfolders) would work, because it
wouldn't update the database of when the files were recycled and where
they came from.

Can you point me to any of these third-party tools?

- Rich
 
F

foxidrive

I asked,


and John John answered,


Thanks, John. Could you elaborate? I doubt that simply MOVEing a file
into C:\RECYCLER (or one of its subfolders) would work, because it
wouldn't update the database of when the files were recycled and where
they came from.

Can you point me to any of these third-party tools?

- Rich


CmdUtils -- (c) 1998-2000 Matt Ginzton, MaDdoG Software
collection release 1.5: 5/28/2000
Web site: http://www.maddogsw.com/
==================================================
A collection of a few free utilities to make life at the Win9x/NT
command line a bit easier and more flexible. Source code included.
CmdUtils currently include:
- Recycle, 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), and you
can recycle whole directories at once (be careful!)
 
M

Matthias Tacke

Rich said:
Can you point me to any of these third-party tools?
This isn't a new question ;-)
<http://groups.google.com/groups?q=command+line+delete+to+recycle>

Some references:

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 line:
<http://www.optimumx.com/download/#EmptyRecycleBin>
 
R

Rich Pasco

foxidrive said:
CmdUtils -- (c) 1998-2000 Matt Ginzton, MaDdoG Software
collection release 1.5: 5/28/2000
Web site: http://www.maddogsw.com/
==================================================
A collection of a few free utilities to make life at the Win9x/NT
command line a bit easier and more flexible. Source code included.
CmdUtils currently include:
- Recycle, 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), and you
can recycle whole directories at once (be careful!)

Thank you!

- Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top