Can not delete files from tree-view

I just started to use atom for my react project. When I try to delete (move to trash) a file from tree-view some red error pops up in upper right of editor and it says that “the following file couldn’t be moved to trash”. I googled it and it seems a solved issue! My atom version is 1.12.7.

Do you have write access to the file you’re trying to delete?

yes I have. even if run atom as administrator I can not delete the file. I
created the file using tree-view.

I have the same problem with Atom running on an iMac (Sierra). When I try to delete the test projects I had created it says "The root directory ‘TestProjectOne’ can’t be removed’ and doesn’t delete any files.

I can delete the directory in finer but even then when I try to delete the project in the tree view I get the same message.

Any ideas anyone?

Atom doesn’t allow you to delete a project root directory from disk via the Tree View, this is true. This is an intentional choice to prevent people from accidentally deleting a bunch of files when they meant to remove a root directory from their project, not delete it from disk.

Seems strange. Do you have specific steps to reproduce the problem? Using Atom v1.12.7 on Mac OS X 10.12.2, I can’t reproduce it from your description.

I’m using win 7 and it is the same on windows 10

I think the problem is that my files are on a usb flash drive. I tried it for files on hard disk and it is working! I can create and rename files on flash drive but delete is not working!!!

That doesn’t tell me how to reproduce the problem. See my blog post on writing good bug reports for some suggestions on how to write repro steps:

Sorry for not being specific about the problem.
I’m using atom version 1.12.7 on win 7 and win 10 both 64 bit version.
I open a folder from my usb drive (Y) using File -> Open Folder. tree-view opens and shows all sub directories and files fine. I can open and edit files by clicking on them from tree view. I added a file using context menu in tree view and it is created with no problems. I can edit and save it and even rename it. but if I select the file in tree-view and try to delete it using context menu, after choosing “move to trash” an error is shown on top right which is saying:
The following file couldn’t be moved to trash:
this file is on a 64gb sandisk usb drive which is partitioned as exfat. I should mention that I tried the same scenario on my external usb hdd which is formatted as ntfs and there is no problem and deleting works fine

That’s really interesting. Could your problem be an instance of

If the problem is due to it not having Recycle Bin support, that is not something that we will correct. (Though we should make the error message more obvious.)

yes I think it is the same. because it is a removable device and windows is not creating recycle bin on it. I moved my files to local drive and it is working very well. I love this editor :slight_smile:
thank you

1 Like