Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

RECYCLE usage?

Jan
616
15
Could I get more clarification on what the RECYCLE command does or is supposed to do? For each of the examples below I will be starting with a default set of 5 files in the recycle bin.
Code:
[C:\test]for /l %i in (1,1,5) echos file%i > file%i

[C:\test]dir /hkw
file1             file2             file3             file4             file5
                25 bytes in 5 files and 0 dirs    20,480 bytes allocated
    47,548,751,872 bytes free

[C:\test]del /y *
Deleting C:\test\file1
Deleting C:\test\file2
Deleting C:\test\file3
Deleting C:\test\file4
Deleting C:\test\file5
     5 files deleted

[C:\test]
The documentation for RECYCLE says
If you don't specify any drives (or paths), RECYCLE will delete (or display) everything in the recycle bin for all local drives.
The display part is the first part of my question. When I read the docs, I take "display" and "everything" to mean "show me a list of all the files in the recycle bin", yet I only get a summary.
Code:
[C:\test]recycle
C:\ :           25 bytes in     5 files

[C:\test]
If this is by design then it's perfectly acceptable, however it would be nice to mention that "display" only shows a summary.

Continuing with display, my eyes are next drawn to the text in parentheses... "(or paths)". This is understood as "you can specify a particular path and display its deleted files".
Code:
[C:\test]recycle c:
c: :           25 bytes in     5 files

[C:\test]recycle c:\
c:\ :           25 bytes in     5 files

[C:\test]recycle c:\test
c:\test :           25 bytes in     5 files

[C:\test]recycle c:\apparently\everything\after\the\colon\is\ignored
c:\apparently\everything\after\the\colon\is\ignored :           25 bytes in     5 files

[C:\test]
This leads to the delete part. The documentation clearly states
RECYCLE will empty the recycle bin for an entire drive; there is no way to specify individual files.
yet there is still the confusion of the "(or paths)".
Code:
[C:\test]recycle /d c:\all\i\want\for\christmas\is\my\two\front\teeth
c:\all\i\want\for\christmas\is\my\two\front\teeth

[C:\test]recycle
C:\ :            0 bytes in     0 files

[C:\test]
It did what it said and emptied the entire drive, however, still confusing.

About the /P switch and "If you don't specify any drives...." After testing, it seems that you are required to specify the drive in this case.
Code:
[C:\test]recycle /d /p

[C:\test]recycle
C:\ :           25 bytes in     5 files

[C:\test]recycle /d /p c:
c: : Are you sure (Y/N)? Y


[C:\test]recycle
C:\ :            0 bytes in     0 files

[C:\test]
A final comment, you might want to mention when specifying drives that the colon is required after the drive letter.
Code:
[C:\test]recycle
C:\ :           25 bytes in     5 files

[C:\test]recycle c
c :            0 bytes in     0 files

[C:\test]recycle
C:\ :           25 bytes in     5 files

[C:\test]recycle /d
C:\

[C:\test]recycle /d c
cTCC: (Sys) The operation completed successfully.
 "c"


[C:\test]recycle /d /p c
c : Are you sure (Y/N)? Y
TCC: (Sys) An attempt was made to reference a token that does not exist.
 "c"


[C:\test]
I haven't done any testing with multiple drive letters since my only other drives, currently, are network drives that aren't set up to recycle.
 

Similar threads

Back
Top