Use a file to ignore / exclude files or folder
Add functionality similar to a gitIgnore file or nomedia files. Allow a user to add a .ignore file to exclude local files or folders from being synced.
Example: I have NodeJS projects on my OneDrive but get sync errors because the file path is too long. The long paths are primarily extra modules that do not need to be synced. It would be nice to be able to exclude certain folders or files.
Hi, for this scenario we’d recommend putting the files outside of the OneDrive folder. The design is that all files in the OneDrive folder will be sync’d and files outside the folder will not be sync’d.
Angry Guy commented
Folders like My Music, My Pictures and My Videos get sync errors. This is stupid. This should not happen and should be handled by default.
This is the best and simply solution to implement and it has only pro. You could simply put an ignore file in the top folder specifying the path to be ignored like .tfignore file (same sintax). This will cause, speedly processing changes, server always free from junk, ultra better user experience. But they are goats. That's the difference with Google Team, every bug open to any google product is analyzed also if not is a bug and they answer you. Microsoft should change the way they think. Most of teams work with OneDrive For Business and they archive all projects folder that containing folders like: bin, obj, packages, node, node_modules, .git, .svn, .tf and many others that users won't upload because Eg. Visual Studio downloads packages any time (hey! it's a Microsoft feature! Needless for onedrive :(!)
I have a password manager application that creates a lock file while it is open that is opened with exclusive access. I want the rest of the files in this app to be backed up to OneDrive. However, OneDrive and all it's icons have a red X on them because of this one file. OneDrive says close the application to back it up. But as soon as you close the application, it deletes the file. There is simply no need to back this file up, as it is a temp file only used by the app itself. You're telling us no one at MS is capable of adding this feature?
@Angus Logan, simply not good enough, this feature seems trivial to implement, whats your REAL motivation to not implement this feature?
While I enjoy this "new Microsoft" and their products, the lack of attention to the community is terrible. Why can't we have this feature? I'm using the Windows Feedback Hub for a lot of things, but Microsoft simply ignores their users.
kk, sometimes, ms isn't care about developers. so many people request this feature but nothing updates on this thread. so sad.
guys its microsoft they will never do It if it works they dont care if you like it or not
after 4 years and 230 comments, still waiting...
@Angus Logan, OneDrive needs a .oneignore concept. Borrow from Git's .gitignore and/or just use the format as is, as it is already well supported. UI can add to the .oneignore with a right-click ignore file/directory. Expand on the idea and you can even set it so that the syncing is limited to certain clients. This would allow you to establish certain clients as the Source of Truth, and while downstream clients could locally modify a file, only identified clients would have the capability to sync up to the web. The file would indicate if there is to be a replace, merge, or append for downstream clients.
Educated Spider Monkey commented
give us the update!!
Philippe Raemy commented
There are cases when you want to sync a folder but not a subfolder. Many comments come from developpers who want to sync their project but not the .vs or .git subfolders.
WE WANT .oneignore!
[Deleted User] commented
Visual Studio complete looses it when working on projects in synced OneDrive folder (My Documents). Being able to ignore /bin and /obj would solve this. So MS recommends to not use OneDrive? Seriously?
I'm using OneDrive to sync developing environment(like customized VS Code) and scripts which has not been pushed yet, between laptop and workstation. But sometimes the node_modules/out (Node.js) or bin/obj (C#) files are so large that OneDrive might hang for minutes to hours, lead to possible syncing problem. (There was a project I developed on my laptop, and it costed nearly two weeks when I saw the real scripts on my workstation).
We WANT .oneignore!
Benjamin Harris commented
I was going mad with this issue.
Poy Chang commented
I need this, we need this! Can we get an update on this?
Alan Draper commented
Agree with the anonymous guy. If OneDrive is supposed to be the default location for stuff, and I can't put my stuff there, then what good is it? Same problem with node_modules clogging up my OneDrive.
If you're going to install OneDrive per default, You need to provide options for advanced users to make it workable.
Right now, If you install windows, then GitHub desktop, then checkout ( to the default location in "Documents" ) you're compleatly screwed. The rubbish OneDrive service will just work itsef to death, Untill you can't even use your local file system anymore.
Greg Holden commented
"Not Right Now".
"How about now?" he asks, four years later.
Darrell Bunger commented
Great for files that aren't part of the system, like a desktop.ini file... is it really that difficult to add an exclusion feature by protected OS filetypes, specific filename, filetype or just plain whitelisting/blacklisting??? I'm not a coder but I just can't imagine adding a white/blacklisting feature could be that painful of a task.
I have no need to sync files like this, particularly some of which can be quite large like thumbnail cache files. Plus the OP reply suggestion of moving such files to another folder, esp in the OP case, would break the testing/dev environment he's working with and make things difficult or impossible to redirect.
Kyle Askew commented
what a ******** answer