Configure Onedrive permanently only 1 cloud-only folder-subfolder


2Savage

Active member
Local time
2:08 AM
Posts
31
OS
Windows 11
Win11 Onedrive desktop app configured to download and sync all files in settings.
I want 1 folder to be viewable on PC, and have all files and subfolders in that folder be cloud-only / file-on-demand, including all future files and subfolders that I may copy to that folder.
For example, folder "Test" is currently empty, then I copy 1 file to it, and it uploads it to the cloud, then automatically removes it from PC, leaving only an icon, then later in the future, if I decided to, I could copy the file from folder to somewhere else on PC, and Onedrive will download file at that moment it is needed.
I am asking for this to happen automatically, I do not want to manually upload files to Onedrive website. I don't want to have all files on PC be cloud only. I don't want to use the Onedrive hide folder option.
Currently, if I configure a folder to be cloud only, and then add 1 file to that folder, the new file will not be cloud only, so that does not work.
How can I do this? Thank you.
 

My Computer

System One

  • OS
    Windows 11
I don't know of any way to have it automatically work that way. You can periodically right click on your folder and choose Free up space and it will remove it from your PC. But if you create a new file in that folder, it will create it again locally.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink SEI8
    CPU
    Intel Core i5-8279u
    Motherboard
    AZW SEI
    Memory
    32GB DDR4 2666Mhz
    Graphics Card(s)
    Intel Iris Plus 655
    Sound Card
    Intel SST
    Monitor(s) Displays
    Asus ProArt PA278QV
    Screen Resolution
    2560x1440
    Hard Drives
    512GB NVMe
    PSU
    NA
    Case
    NA
    Cooling
    NA
    Keyboard
    NA
    Mouse
    NA
    Internet Speed
    500/50
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    Mini PC used for testing Windows 11.
  • Operating System
    Windows 10 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom
    CPU
    Ryzen 9 5900x
    Motherboard
    Asus Rog Strix X570-E Gaming
    Memory
    64GB DDR4-3600
    Graphics card(s)
    EVGA GeForce 3080 FT3 Ultra
    Sound Card
    Onboard
    Monitor(s) Displays
    ASUS TUF Gaming VG27AQ. ASUS ProArt Display PA278QV 27” WQHD
    Screen Resolution
    2560x1440
    Hard Drives
    2TB WD SN850 PCI-E Gen 4 NVMe
    2TB Sandisk Ultra 2.5" SATA SSD
    PSU
    Seasonic Focus 850
    Case
    Fractal Meshify S2 in White
    Cooling
    Dark Rock Pro CPU cooler, 3 x 140mm case fans
    Mouse
    Logitech G9 Laser Mouse
    Keyboard
    Corsiar K65 RGB Lux
    Internet Speed
    500/50
    Browser
    Chrome
    Antivirus
    Defender.
I don't know of any way to have it automatically work that way. You can periodically right click on your folder and choose Free up space and it will remove it from your PC. But if you create a new file in that folder, it will create it again locally.
I've used OneDrive for more than 15 years and I don't know of any way to have it automatically work that way either. I've always wanted to keep files on both local OneDrive and cloud OneDrive so they were available for my backups.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell XPS 16 9640
    CPU
    Intel Core Ultra 9 185H 45W
    Memory
    32GB LPDDR5x 7467 MT/s
    Graphics Card(s)
    NVIDIA GeForce RTX 4070 8GB GDDR6
    Monitor(s) Displays
    16.3 inch 4K+ OLED Infinity Edge Touch
    Screen Resolution
    3840 x 2400
    Hard Drives
    1 Terabyte M.2 PCIe NVMe SSD
    Cooling
    Vapor Chamber Cooling
    Internet Speed
    960 Mbps Netgear Mesh + 2 Satellites
    Browser
    Microsoft Edge (Chromium) + Bing
    Antivirus
    Microsoft Windows Security (Defender)
    Other Info
    Microsoft 365 subscription
    Microsoft OneDrive 1TB Cloud
    Microsoft Visual Studio
    Microsoft Visual Studio Code
    Microsoft PowerToys
    Macrium Reflect subscription
    Dell Support Assist
    Dell Command | Update
    LastPass Password Manager
    Amazon Kindle for PC
    Interactive Brokers Trader Workstation
    Lightroom/Photoshop subscription
    BitLocker
    CoPilot
You can create a scheduled task to mark the files as sparse. Then, clear the pinned attribute, and set the unpinned and offline attribute.

Code:
forfiles /p "X:\Path\To\Folder" /m *.* /s /c "cmd.exe /c @fsutil sparse setflag @path"
forfiles /p "X:\Path\To\Folder" /s /c "cmd.exe /c @attrib -p +u +o @path"

Before and after:

Screenshot 2024-07-15 220907.png
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical Keyboard with Cherry MX Clears
  • Operating System
    Linux Mint 21.2 (Cinnamon)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC8i5BEH
    CPU
    Intel Core i5-8259U CPU @ 2.30GHz
    Memory
    32 GB
    Graphics card(s)
    Iris Plus 655
    Keyboard
    CODE 104-Key Mechanical Keyboard - Cherry MX Clear
Back
Top Bottom