OneDrive ignore files
Project description
OneDriveIgnore
OneDrive sync settings are horrible! This script renames files so they can sync, and then switches back to original extension when you need them. Keeping everyone happy.
Reason for the script
Company I work for started to use OneDrive for MyDocuments, I don't particularly use that folder much since I do lots of scripting, and programming. OneDrive isn't the best for engineering purposes. I do have some folders I share that are on MyDocuments that I'd like to keep synced without deleting what's stopping the syncing. If you google "how to ignore a folder in onedrive" you'll get tons of discussions online about this issue.
See response from Angus over on OneDrive https://onedrive.uservoice.com/forums/262982-onedrive-archive/suggestions/6988070-use-a-file-to-ignore-exclude-files-or-folder
Recently my VSCode powershell extension complained about my package management being out of date, and installed it in MyDocuments. I figured just ignore this folder for Sync, but no, OneDrive removes the folder from the PC even if it originated from the PC, leaving me without my powershell package management.
Install
pip install onedrive-ignore
Usage
Create ignore_paths.txt
file then place it in %userprofile%\.config\onedrive-ignore
, and add one path per line to folders that are causing issues.
C:\Users\fernando\OneDrive\My Documents\WindowsPowerShell\Modules\PackageManagement\1.4.7\coreclr\netstandard2.0
C:\Users\fernando\OneDrive\My Documents\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclr
This script does a renaming of the file to txt file, then when restoring the files to original extension it simply removes the .txt.
onedrive --ignore
onedrive --restore
# Short version
onedrive -i
onedrive -r
Files Ignored, synced to onedrive:
Files Restored, OneDrive not syncing:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file onedrive-ignore-0.0.4.tar.gz
.
File metadata
- Download URL: onedrive-ignore-0.0.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95e75000b496d7e79fde7587038b20cc9bb639cab5ceed9b3e462392caf6e802 |
|
MD5 | b3029006466b9ead948bbaf03f4a3d54 |
|
BLAKE2b-256 | a8825dddfabe6c2ebb73aa691ea20c0af80d97b31eb18baa6ae881ff9c626a60 |
File details
Details for the file onedrive_ignore-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: onedrive_ignore-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e00522aa580303888dcabd3eb40ccfa5944976c62da109f3443850ca21fb0efb |
|
MD5 | 14cdeb9086ab93baed61c056c1c0efc0 |
|
BLAKE2b-256 | 6dc480bd32a7881216ce820d433889ca93166395e50f2ae25e004d70ad20f154 |