Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Unable to delete files on Windows without a Recycle Bin #856

Closed
manuelbieh opened this issue Jun 1, 2016 · 51 comments
Closed

Unable to delete files on Windows without a Recycle Bin #856

manuelbieh opened this issue Jun 1, 2016 · 51 comments

Comments

@manuelbieh
Copy link

manuelbieh commented Jun 1, 2016

The issue is probably related to #666 – i still cannot delete files or folders from within the tree-view when the files are located on a mapped virtual drive.

Steps to reproduce:

  • Create a new registry entry (and restart Windows afterwards):
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices] 
"W:"="\\??\\D:\\htdocs"

edit:
subst W: D:\htdocs – causes the same problem

  • Create a file on your freshly mapped DOS device W:\example\example.txt
  • Open folder W:\ in atom
  • Try to delete W:\example\example.txt using the tree-view -> fails

Opening D:\htdocs instead and then trying to delete example.txt works fine. File and folder rights are identical. Creating files or folders or renaming them works completely fine, only deletion is not possible (see my attached screenshots).

Comparison:
comparison

Broken
broken

Deletion when opening D:\htdocs instead works fine!

@manuelbieh manuelbieh changed the title Unable to delete files on Windows in virtual drives (DOS Drive) Unable to delete files on Windows in virtual drives ("DOS Device") Jun 1, 2016
@Ben3eeE
Copy link
Contributor

Ben3eeE commented Jun 1, 2016

I have the same issue with network mapped drives on Windows. Always assumed it was a duplicate of #830 so never created an issue for it.

@manuelbieh
Copy link
Author

Seems to be pretty similar, indeed.

@manuelbieh
Copy link
Author

I think I found the reason: virtual drives do not have an explicit recycle bin folder where Atom could move the files into:

Manuel@Manuel-406 /cygdrive
$ ls /cygdrive/c/'$Recycle.Bin'
S-1-5-18  S-1-5-21-2028212831-3322830245-2971025389-1001  S-1-5-21-4197599123-4253082845-4033610845-500

Manuel@Manuel-406 /cygdrive
$ ls /cygdrive/w/'$Recycle.Bin'
ls: Zugriff auf '/cygdrive/w/$Recycle.Bin' nicht möglich: No such file or directory

That's probably the reason why it fails: the folder Atom is trying to move the file into just does not exist.

@manuelbieh
Copy link
Author

this workaround by saeed sagharichi works for me at the moment!

http://answers.microsoft.com/en-us/windows/forum/windows_7-files/windows-7-recycle-mapped-drives/95751679-428c-44b0-a8db-1783df9b5e13#3ca21578-3472-443c-8037-bfbdac1dd398

@50Wliu 50Wliu changed the title Unable to delete files on Windows in virtual drives ("DOS Device") Unable to delete files on Windows without a Recycle Bin Jun 7, 2016
@50Wliu
Copy link
Contributor

50Wliu commented Jun 7, 2016

Blocked on electron/electron#4974.

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Jun 8, 2016

@50Wliu #830 was mac only and closed for this Windows specific. It appears to be the same problem on both platforms, deleting from a drive without a recycle bin however. So maybe this and the electron issue should change labels?

@yassersharaf
Copy link

Windows 10 X64 still can't delete files to trash while recycle bin is enabled and i'm deleting project files from D:\XAMPP\htdocs folder
Any working solution?

@50Wliu
Copy link
Contributor

50Wliu commented Jun 8, 2016

Your D:\ directory most likely doesn't have a Recycle Bin.

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Jun 9, 2016

Also very similar but on Linux #345 (comment)

@jcgertig
Copy link

jcgertig commented Jun 15, 2016

I cant add a recycling bin on my drive because it is a vdi any work around for delete

@slikts
Copy link

slikts commented Jul 7, 2016

@manuelbieh Thank you, the Windows workaround works.

@mjmjelde
Copy link

mjmjelde commented Mar 8, 2017

Has there been any updates to this recently? Is there no way to not have something delete without a Recycle bin? Like a Permanent delete instead of just moving it to a Recycle bin? Would be nice to be able to delete things from mounted drives without having to do any extra workaround steps

@slikts
Copy link

slikts commented Mar 8, 2017

A permanent delete without confirmation would be too dangerous. See the workaround above.

@mjmjelde
Copy link

mjmjelde commented Mar 8, 2017

@slikts I didn't say without confirmation. You can still have a prompt that says to confirm this deletion, but when I try to delete something right now all I get is a "Move to the Recycle bin" button. This is why it was causing issues is because it was trying to move it to the Recycle bin, which didn't exist on that drive. Having another button on there to permanently delete an item would be nice, even if there was another prompt of "are you really sure"

I just want to be able to delete extra folders or files I make on accident without having to open up explorer to delete them

@TeapotNickS

This comment has been minimized.

@50Wliu

This comment has been minimized.

@TeapotNickS

This comment has been minimized.

@geoffryb
Copy link

I had a similar issue.

Couldn't delete folders on my Storage/Workfolder (F) drive. I noticed that the recycle bin was called $RECYCLE.BIN on F and $Recycle.Bin on C.

Changed the name of the F folder to $Recycle.Bin and it worked.

@dark-swordsman
Copy link

@DannyJJK > Why can't we do what VS Code does, and have it say "This file cannot be moved to trash, do you want to delete permanently?" then give the option to the user.

I completely agree with that. I was able to enable recycle bin and it works now, but that should, by default, be a feature.

@AlicanGul
Copy link

I don't use Recycle Bin. I'm sure many people don't. Really don't get why can't atom delete files permanently.

@davidsusu
Copy link

I am on Debian, with disabled trash. I have tried Atom today for the first time on this machine, and I almost uninstalled because I could not delete any file. Fortunately, the permanent-delete plugin helped. However, at least Shift+Del or something similar should be work by default.

@BlaM
Copy link

BlaM commented Jan 10, 2018

Is there an option to disable the built-in "delete" functionality completely? It's sometimes confusing to have two delete options with one of them not working.

@lee-dohm
Copy link
Contributor

Thanks for the feedback.

This is a specific design decision. If Atom can't find the Recycle Bin, Trash or whatever OS analog there is, Atom will refuse to delete a file. We have simply had too many people running into problems with accidentally deleting files they didn't intend to delete and blaming Atom. It requires too much support effort for something that is a nice-to-have. If people would like to have the error message improved so that it provides more context, that is definitely something that we would evaluate.

Since this issue, as it is formulated, isn't something that we're going to correct. I'm going to close this. Thanks again for all your input.

@Cylindric
Copy link

Yeah, why behave like every other app in existence and follow standard OS conventions? Horrible decision
:(

@samuelharmer

This comment has been minimized.

@alexus85
Copy link

alexus85 commented Feb 6, 2018

well our security rules disabled trash across all computers ... So what about making an option somewhere in the Atom's settings which would override the default behavior? .. Meaning that the file would be deleted permanently when such option is enabled.

If that's not possible, I suppose I have no other choice but switch to some other IDE.

@50Wliu
Copy link
Contributor

50Wliu commented Feb 6, 2018

@alexus85 you can install packages such as permanent-delete if you wish to do so.

@bitsnaps
Copy link

bitsnaps commented Mar 14, 2018

I believe Shift + Del is most accurate choice for deleting objects permanently, since this is the most used behavior for many OS not just Windows, I like the default behavior for Del key so far.

@lucas-pouchot-zz
Copy link

lucas-pouchot-zz commented Jul 4, 2018

We have simply had too many people running into problems with accidentally deleting files they didn't intend to delete and blaming Atom

Peoples who lose files like this shouldn't blame Atom but start using a versioning tool like git.
having to delete his files outside the editor is penalizing :(

It would be cool to be able to set the default drive for the Recycle Bin

@manngo
Copy link

manngo commented May 14, 2019

Since this issue, as it is formulated, isn't something that we're going to correct. I'm going to close this. Thanks again for all your input.

Sorry, but I don’t think that’s a very realistic approach. Anybody who blames a text editor for deleting files when requested has missed the point, and normal users who know what they’re doing shouldn’t be punished for their ignorance.

This isn’t just nice to have. There are many reasons that a volume doesn’t implement a Bin, and Atom shouldn’t make the arbitrary decision to imagine that it does. That’s not the way software should work.

@xorinzor
Copy link

Can't believe this issue is basically closed as a "wont-fix".

I guess I will just have to abandon Atom then, as it's very annoying that I can't delete files within Atom without applying some odd workaround of creating a fake recycle-bin. It's a network share, it doesn't have nor need a recycle-bin.

@Cylindric

This comment has been minimized.

@dark-swordsman

This comment has been minimized.

@DannyJJK
Copy link

It’s funny how the above comments were marked as off-topic. VS Code has worked fine without a recycle bin since I started using it, possibly since its first release. Making a good Electron app is to make it so that it doesn’t feel like you’re using Electron or something independent of how the OS works. If deleting a file without a recycle bin is possible outside of Atom, it should be possible inside of Atom, just give the usual confirm dialog of “Are you sure you want to delete this?” with a message of how there’s no recycle bin option. It’s really not that hard, and ignoring the issue or hiding comments is really just showing why VS Code has taken over. I’d love to love Atom, but ignoring the user base is the number 1 reason as to why you lose users

@marcpeterson
Copy link

If you're seeing the error "The following file couldn’t be moved to trash” and “Is there a Recycle Bin on the drive where the files are stored”, then your D drive's recycle bin alias may be named differently than in your C drive. Seems like Atom cannot handle that.

I was able to fix this in Windows 10. The recycle bin in your C drive is a hidden folder called $Recycle.Bin. In your D drive it may be called $RECYCLE.BIN. Renaming the D drive alias to match the C drive folder fixed this. I do not know if this will cause other side effects. Although Windows is supposed to be case-insensitive, so hopefully not.

To view a drive's hidden files, in Explorer go to View -> Options -> Folder Options -> View -> Advanced Settings and uncheck "Hide protected operating system files".

@MichaelJCole
Copy link

This bug also affects files loaded using WSL2 paths. Permanent delete package doesn't work. Ok, fine. VSCode it is.

@GCSBOSS
Copy link

GCSBOSS commented Nov 30, 2020

Why you keep pushing me to VSCode?!! It's like you don't want me anymore 😭
Seriously, is there any way you guys can unbreak Atom for a lot of users on this matter?

@msbeck
Copy link

msbeck commented Feb 10, 2021

Just adding my two cents. This still happens on Mac Big Sur 11.1

Developing code to run ON a usb attached device and need to move files in and out often. Workflow is edit a code file on the local drive, and send it off to run on the usb device. Don't want to consistently work out of a non stable drive and have to constantly keep backups, just send code as necessary to run to the device when needed.

Cannot delete within the editor. Would like to be able to drag from one directory over to the device to overwrite files as necessary, but the filenames are appended with 0, etc. so cannot replace. Have to open up finder and delete a file I need replaced, or go through the save dialog, but that switches my future edits to ctrl+s save onto the target device rather than the local version.

@manngo
Copy link

manngo commented Feb 12, 2021

@alexus85 you can install packages such as permanent-delete if you wish to do so.

I don’t know why this was downvoted. It doesn’t solve the fundamental problem that some Atom designer made a weird decision about usability and chooses not to listen to users who want it fixed, but it does at least offer a workaround.

I myself have found this workaround very useful.

@wKovacs
Copy link

wKovacs commented May 18, 2022

This has still no fix?

The easiest solution would be: inform the user there is no recycle bin AND offer the option to delete permanently in form of easy yes or no question.

right now I use permanent-delete. Most of the time I go for "normal" delete just out of habit and the error message is annoying in addition I have to issue another comment instead of getting a solution offered

@darrenthebozz
Copy link

This is really annoying on a domain that prevents such tasks as having a recycling bin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests