0

I want to create a batch file for others to run, but don't want it to permanently delete files. Is there any way without third party software and without displaying any dialogs to delete files to the Recycle Bin from a batch file?

[Someone is saying this question is same as What is the command line way of sending files to the recycle bin?, but there a third party software is being requested which I don't want. So how is it a duplicate question?]

Jai
  • 9
  • 3
  • Who said I want to remove a file FROM the RB? I want to delete a file TO the RB using batch. Normal del command if you don't know doesn't use RB and does permanent deletion, which I don't want. – Jai Jan 15 '17 at 22:46
  • What is rude about the comment above? I don't get it? Ok, if you don't know and can't help then no use of false excuses about disrespect. I will wait for an answer from someone else. – Jai Jan 15 '17 at 22:50
  • Very ugly style of calling Delete from file's context menu using JScript in deleteJS.bat, but @AFH it gives me a clue about using JScript from batch so thank you. I will see if there is better way to delete to RB in JScript. – Jai Jan 15 '17 at 23:01
  • No @Ramhound how do I know if you know about del behavior or not? I was just being clear about what I wanted. – Jai Jan 15 '17 at 23:02
  • I don't see point of this argument @Ramhound. I was not having any intention of being rude, and neither I was but maybe you felt that way and I can't help it. And NO, that is not a duplicate because I am not asking for third party software which other question is about. – Jai Jan 15 '17 at 23:08
  • The answer provided multiple answers, only a few of them, required third-party software. Just because you didn't ask how to do it with third-party software, does not mean, it isn't a duplicate. If I were to answer your question at this point I would be duplicate an answer from that duplicate. Unless you consider PowerShell to be a third-party application? – Ramhound Jan 15 '17 at 23:17
  • And how @Ramhound I can call that PowerShell code from batch since I have need of using only batch? Who will answer that part of the question? If other question's answer is not answering my question 100% then I think it is not a duplicate so I don't know why you are trying so hard to prove it. How is this question hurting you? You are still angry about comment above and so are trying to close this? – Jai Jan 15 '17 at 23:28
  • @Jai, the suggested question doesn't ask for a solution using third-party software. The answers offered the available solutions. – fixer1234 Jan 16 '17 at 08:45
  • [Batch script move files from Windows Recycle Bin](http://superuser.com/q/715673) is not duplicate @Ramhound because it is asking opposite question about how to move files FROM RB to different folder. For PowerShell call from within batch script I don't know how to make batch run command like this - $sh = new-object -comobject "Shell.Application" and I don't want to have separate PowerShell file. Everything should be in 1 batch script only. – Jai Jan 16 '17 at 11:03
  • But it is asking for command line program to delete to RB, @fixer1234, and as we all know no such internal program is there so naturally answers will give only third party software. Question intention is not the same as this one. – Jai Jan 16 '17 at 11:04
  • check this - http://stackoverflow.com/a/29771020/388389 – npocmaka Mar 09 '17 at 22:05
  • @Jai This has confused me too, but if a question is broad enough to acquire multiple viable answers, and some of those answers answer a later question, then the later question is so closed and redirects to the earlier one. It does not require that the duplicate be requesting results with same criteria, nor that the Accepted answer is the only answer considered when assessing for Duplicate status. There is probably a better way to do it, but that's SE for you. https://superuser.com/help/duplicates – can-ned_food May 21 '18 at 17:14

0 Answers0