Fix "Free Up Space" greyed out for Files On-Demand
With the "File On-Demand" settings activated, the option "Free up space" from the Windows Explorer contextual menu is grayed out on parent directories.
However, it is available for individual files.
This happens if the "Free up space" has been already clicked once on a given directory. After adding files (locally available), the option is grayed out on this directory, although some children files are available locally (thus space not "freed up").
Steps to reproduce the error:
1/ Create a directory, e.g. OneDrive/test
2/ In this directory, create a file, e.g. OneDrive/test/file1.txt
3/ Wait for the OneDrive sync to end.
4/ The "file1.txt" will be locally available
5/ Right click on the "test" parent directory, and select "Free up space"
6/ Wait for the OneDrive sync to end.
7/ The "file1.txt" will switch status from "local" to "online"
8/ Add a new file "file2.txt" in the "test" directory: OneDrive/test/file2.txt
9/ Wait for the OneDrive sync to end.
10/ The "file1.txt" will be locally available
11/ Right click on the "test" parent directory, the option "Free up space" is now grayed out
Windows 10 x64, Version 10.0.17134 Build 17134
OneDrive for Windows, Version 2018 (Build 18.222.1104.0007)
The last comment is the key. If this option is not available on parent folders, it essentially makes the feature useless. Need to be able to "refresh" a parent folder to move new files/folders to On-Demand only as they are added periodically.
Lucian C. commented
This option WAS WORKING on the older version of Windows/OneDrive and I have use it on my PARENT folders but now is greyed out.
Please reactivate it on the parent folders otherwise the "file on demand" options is useless - I cannot go to every folder to clean up the space. :(
Robert Rollins commented
I have the same problem, and it makes the Files On-Demand feature almost worthless to me.
I used a slow HDD to store files that I don't need to access frequently. When I found out about Files On-Demand, I figured, "Great! I can store these files in the cloud, instead of on that hard drive that I've been meaning to decommission.
So I spent like a week transferring my files off that drive and into my One Drive folder, using the "Free up Space" options each time a top-level folder finishes syncing.
But now when I add new files to deep subfolders within the One Drive folder, they not only don't get "freed up" automatically, but I can't do so manually either, unless I go find the individual files and free them all up manually.
This is unacceptably bad UX. You need to either prevent "Free up space" from ever being greyed out, or make it intelligent enough to notice that there are subfolders that have non-freed files within them, and ungrey it when that happens.
I think the first option, making it never grey out, makes the most sense.
steve gouldstone commented
I have the same problem. I'm trying to replace a 1TB HDD with 250GB SSD. No problem I thought, I'll just delete all the local copies of the Onedrive folder (incidentally I have onedrive folder on D: drive). Then there will be plenty of room.
I click 'free up space on one folder (about 50GB storage I think). I now have another folder in onedrive where 'free space' is greyed out. So I cannot free up space.
I have tried stopping/retstarting onedrive, pause/resume syncing, rebooting. But it is still greyed out after over one day (in case it was processing something).
So I am unable to free up space on HDD to fit drive contents on SSD.
Cameron Oliver commented
I am having the same issue, and I can't do the work-around keeping on my device first because it is a shared space for my whole company and is far too large to fit on my local disc. I was looking into making a script to do it for each file individually, but that doesn't look possible.
I didn't even have the trigger of the bug mentioned in the OP, it is just happening. Since I am also experiencing an issue where there are random files I have never opened being kept on my device, it is very annoying as I am unable to get my disc space back
Rob Nicholson commented
Similar problem here with confused flag settings. Another way to repeat it. Assume "E:\OneDrive - Revolution" is your OneDrive folder. Run robocopy "E:\OneDrive - Revolution" "E:\Backup" /mir /ndl which forces all the files to download. The "Clear space" option at the root is grayed out. Clicking keep and then clear space does work. You can also use attrib with the unpin settings
I found that if "Clear Space" is greyed out, I can have it re-appear by first clicking "Always Keep on this device". Once that finishes, it is possible to click "Clear Space".
Ryan T Ralston commented
I had a similar problem. When moving a folder of files from a synced folder (with local copy) to a cloud based on-demand folder, I would get the greyed out Free Up Space option in the on-demand folder even though the local version was still there.
As a workaround, I did find that if I right clicked the recently relocated folder and selected "Always keep on this device" THEN right clicked, I would get the option to "Free up space."
It isn't perfect, especially if you have a mix of both local and cloud files in the transferred folder (it needs to download all the on-demand files when you select 'always keep on this device,' but nonetheless it does seem to get around the greyed out option.
Pedro Lucas commented
I arrived here because I have the same problem.
I had a 500GB huge folder on Onedrive locally full of small files, and decided to "free up space", but the menu item is "greyed out".
I can "Free up space" on files, but I have 84K files...and it's not practical to search for 84K "*" , try to select all and Free up space. Actually it doesn't work, it's too many files to show on a folder list.
If i create a test folder the "Free up space" is enabled and works ok. But on my huge size folder, the one I "need" to get space from...it's greyed out.