5

In OneDrive, a folder recently appeared called "Email attachments":

screenshot of folder

I have no use of this folder so I would like to delete it, so I simply deleted it from the OneDrive folder in Windows Explorer, and it immediately synchronized that with OneDrive, deleting the folder in OneDrive also, just like it should. The problem is that a while later, the folder appeared again. So I deleted it again. And it appeared again. And so on.

I finally decided to search for a solution on Google, and I found out that the folder is created by Outlook and that it's created every time you send an email from Outlook. Except that I use Gmail, not Outlook, and my OneDrive account is connected to my Gmail account. Anyway, when searching, I found this where it says to change the settings in Outlook. I tried to do so, but I could not find the setting in question in Outlook (the person asking that couldn't either).

I can think of several workarounds, like hiding this folder by doing Properties and check Hidden, but I would like to delete it completely and permanently.

Is there any way to delete this folder without it reappearing?

Edit

Thanks to an answer that should have been posted as a comment and that got deleted, I noticed that this folder is created whenever I use the OneDrive app for iPhone. However, I can't find any setting in the app that disables this feature. Is there any way to keep this folder from reappearing?

  • Are you on the Windows 10 Fast Ring by chance? – Ƭᴇcʜιᴇ007 Jan 12 '17 at 14:36
  • @Ƭᴇcʜιᴇ007 I don't think so. I'm using the OneDrive folder that's created automatically and preinstalled with Windows 10. – Donald Duck Jan 12 '17 at 15:01
  • "I dont' think so" = You can check via Start -> Settings -> Window Insider Program. Or alternatively, perhaps just run winver and tell us the exact edition and build of Windows 10 you're using. I'm asking because I believe this is a new "feature in the latest preview build, so I want to confirm the build you're using. – Ƭᴇcʜιᴇ007 Jan 12 '17 at 18:23
  • @Ƭᴇcʜιᴇ007 I ran winver and it didn't say anything about Windows 10 Fast Ring. You can see a screenshot of the window that I got when running winver here (some parts were in Swedish so I translated them to English). – Donald Duck Jan 12 '17 at 19:01
  • While waiting for a proper solution, I've made a little program in C that deletes that folder automatically every second that I always have running in the background. The Code::Blocks project for this program can be downloaded here. Remember to change the path of my folder ("C:\\Users\\dduck\\OneDrive\\Bifogade e-postfiler") to whatever path your folder is at. If you don't know C, you can either learn C by googling for a tutorial or you can make something similar in another programming language if you know any. – Donald Duck Mar 6 '17 at 17:09
1

The directory is only created when I use the OneDrive apps on iPhone - like someone already noticed. I ended up renaming the directory and moving it from the root to a subdirectory one-layer deeper - out of the sight out of the mind. So far it is holding up for me.

| improve this answer | |
  • I did that just after you posted your answer, and it still hasn't reappeared since even though I've used the OneDrive app several times since then. So it seems like this answer works. – Donald Duck May 20 '18 at 15:31
2

I don't think this will fix the issue, but to disable Outlook.com from using Onedrive, do this. On Outlook.com click the gear and select Options. Navigate to Mail, Attachment Options, Attachment preferences. Click Always attach them as copies for both sections.

I suspect the OneDrive people really want you to have this folder :-)

| improve this answer | |
  • That didn't work, I tried it and it didn't keep the folder from reappearing. – Donald Duck Jan 12 '17 at 12:32
0

I tried to use DonaldDuck's code, but it is not working for german users because we have an "ä" in the folder's name (it is called "E-Mail-Anhänge").

It actually seems to be quite tricky to delete a folder with special characters in the name (german umlaute like ä,ü,ö). I tried it in other scripting languages but I got the same error. When somebody knows how to achieve this, it would be great if you could shortly explain it.

I found a method that can handle a wildcard and created a workaround for the workaround. Just copy the code below and save it as a .jse file and assign the wscript.exe as the standard program. Double click to run it and don't forget to copy the file in the windows autostart folder (Windows -> Run -> shell:startup).

var fso = new ActiveXObject("Scripting.FileSystemObject");
var path = "C:\\Users\\Maximilian\\OneDrive\\E-Mail-Anh*nge";

while(1){  
 WScript.sleep(1000);

 try {
  fso.deleteFolder(path);
 }
 catch(e) {
  // nothing
 }
}

I know it's not a really nice solution, but the thing is that the method "folderExists()" cannot cope with wildcards. Quite stupid microsoft ;)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.