File History Cleanup - Delete Older Versions in Windows 8

How to Use File History Cleanup to Delete Older Versions of Files in Windows 8 and 8.1

information   Information
File History is a new feature introduced in Windows 8 that automatically backs up files that are in your libraries, contacts (C:\Users\(user-name)\Contacts), Internet Explorer favorites (C:\Users\(user-name)\Favorites), and your desktop (C:\Users\(user-name)\Desktop).

This tutorial will show you how to use File History cleanup to delete all backed up file versions older than the number of days you specify in Windows 8, Windows RT, Windows 8.1, and Windows RT 8.1.

Note   Note
File History saves your files in the Data folder in the selected local or network drive at the location below.

(selected drive)\File History\(user-name)\(computer-name)\Data\C\Users

If you like, deleting the File History folder will delete all versions of files and folders on that specific selected drive.





OPTION ONE

To Use File History Cleanup from Control Panel



1. Open the Control Panel (icons view), and click/tap on the File History icon.

2. On the left side in File History, click/tap on Advanced settings. (see screenshot below)

File_History_Cleanup-1.jpg


3. Under the Advanced settings section, click/tap on the Clean up versions link. (see screenshot below)

File_History_Cleanup-2.jpg


4. In the drop down menu, select the age you want to delete versions of files and folders from, and click/tap on Clean up. (see screenshots below)

File_History_Cleanup-3.jpg


5. If File History Cleanup didn't find any versions of your files that were older than the selected age, then click/tap on Close. (see screenshot below)

File_History_Cleanup-4.jpg


6. If File History Cleanup found and successfully deleted any versions of your files that were older than the selected age, then click/tap on OK. (see screenshot below)

File_History_Cleanup-5.jpg


7. When finished, you can close File History if you like.






OPTION TWO

To Use File History Cleanup from Command Prompt



1. Open an elevated command prompt.

2. In the elevated command prompt, type the command you want to use below, and press Enter. (see screenshot below)

FhManagew.exe -cleanup age

OR

FhManagew.exe -cleanup age -quiet


Note   Note
Substitute age in the command above for how many minimum number of days old of file versions that can be deleted.

To suppress all output, use the -quiet command-line option.

A file version is deleted if both of the following conditions are true:

  • The file version is older than the specified age.
  • The file is no longer included in the protection scope, or there is a newer version of the same file on the target device.

If the age parameter is set to 0 (zero), all file versions are deleted, except for the newest version of each file that is currently present in the protection scope.

For example: To delete all file versions that are older than one month.

FhManagew.exe -cleanup 30

For example: To delete all file versions that are older than one year and suppress all output.

FhManagew.exe -cleanup 365 -quiet





Clean_File_History_Command.png


3. If File History Cleanup didn't find any versions of your files that were older than the specified age, then click/tap on Close. (see screenshot below)
NOTE: You will not see this prompt if you used the -quiet option.

File_History_Cleanup-4.jpg


4. If File History Cleanup found and successfully deleted any versions of your files that were older than the specified age, then click/tap on OK. (see screenshot below)
NOTE: You will not see this prompt if you used the -quiet option.

File_History_Cleanup-5.jpg


5. When finished, you can close the command prompt if you like.



That's it,
Shawn


 

Attachments

  • File_History.png
    File_History.png
    13.9 KB · Views: 420
Last edited by a moderator:
File History Clean up

I want to run my file history clean up, but the message is slightly confusing and I want to make sure I'm not deleting certain files that I want to keep.

File history message.jpg

This is the part i'm looking for clarification on "All other files and folders, such as versions that were excluded or removed from your libraries, are also deleted"

I realize how file history works, if there is two of the same files, one with an older date and one more recent, it deletes the older one. But here is my question: After running file history, to save space on my main hard drive I have deleted certain files that were backed up, so right now they exist in my file history back up, but not on my main drive. If I run the file history clean up, is it going to delete the files which it previously backed up but are no longer on my main HD? Or will it just delete the older timestamped files, and leave the ones that were previously saved with file history, but no longer exist on my main HD?

Any clarification would be great! I can't seem to find a clear answer to my question.
 
I currently don't have any excluded files.

So let's say I run File History and am backing up My Pictures > Photos > Picture.jpg
So it creates My Pictures > Photos > Picture(2013_11_27 08_00_19 UTC).jpg on the file history backup.

Then I go to delete the original file (My Pictures > Photos > Picture.jpg) to save space on my main hard drive.
When I run the file clean up will it see that Picture.jpg is no longer on my main hard drive and therefore delete Picture(2013_11_27 08_00_19 UTC).jpg in the file history back up?

Does that make sense?
 
Yep, that makes sense.

Short answer is no. In that situation, File History Cleanup would only delete versions of files (including that file) older than the time frame you selected.

This is so since the point of File History is to be able recover a saved previous version of a file that was say mistakenly deleted or modified from the source.
 
Thanks for clarifying things!

Just to make sure I fully understand, it will only delete files that have a more recent back up, and therefore if I wanted, once file history backed up my whole Photos folder onto my external HD I would be free to delete it on my main drive without worrying about file history cleaning it up after its over a month old (if that's what my clean up schedule is set to)?
 
If you don't want to lose the files, then I would always recommend to never delete them, and keep a copy of them at another location for safe keeping. Even if you use File History. Best to be safe than sorry later.

File History Cleanup will still delete the saved versions of those files if the saved versions are older than the time frame you selected in File History Cleanup.
 
Tutorial updated to add OPTION TWO to run File History Cleanup from a command. :)
 
I've been trying out file history on a networked drive and am finding its a really great feature but like Bob above, I've had questions over deletion of (now) unwanted files.

Some questions I have,

1/ Would manually deleting files from the history folder cause any problems with any data base file that may be present on the main C drive.
If there is such a file, where is its location ?

(I'm asking all this because I have just had to restore my C drive (using Acronis) to a date from last week. This has left my file history 'user screen' (that is the File History recovery screen a normal user sees) as correct for the restored date but there are dozens of now unwanted files in the history location. These unwanted files were all created between the Acronis image date and today and as such were all valid at the time, but now I don't want them. Hope that makes sense)

Even without the complication of the image restore, I also generate huge but fleeting (as in several gb) temp files from running some specialised simulation software. These would all be candidates to delete at will should any make it to the History File. I called them 'temp' files but they live in the folder containing the data for the simulation which in practice is just a folder in 'Documents' and these temp files self delete when the simulation is closed.

2/ I noticed there are some 'catalogue' and some xml 'config' files in a folder on the History drive that are I think related to File History keeping track of changes. So similar question as above. Does an image restore of the C drive throw these config files on the History drive into confusion because they would now be out of step with any similar file on the C drive carrying the OS.
Its not easy to explain it all... it makes sense to me, hope it does to others as you read it :)

The two real questions though are,
1/ How best to manage and delete files from File History that I really don't wont anymore.

and,

2/ What (if any) log or xml files etc exist on the C drive that relate to file History.

Its all very much a learning curve but as a practical example of things going awry......

Following the Acronis restore there were some files I wanted to keep and these of course were in the File History location. Now the restored image had no knowledge of those files and so they do not show on the normal user interface. Even manually running File History didn't change that. Browsing for the files manually in the File History location and dragging them over to their home on the C drive of course works just fine except that now, when File History updates, it sees what it thinks are a new set of files and so copies these back to the History location. Result... duplicate History files. A minor problem I know.
 
Clarification on file locations deleted, please

<< If you like, deleting the File History folder will delete all versions of files and folders on that specific selected drive. >>


Clarification, please. Let's say that I have a Dropbox folder tree on my gigantic local hard drive. My File History folder is a subfolder within that tree. If I delete the File History subfolder and its contents, what becomes of the master files (stored in other Dropbox subfolders) from which the copies were made? Are they deleted as well?


It is unclear to me whether the File History folder contains actual independent copies. Or whether the copies are somehow linked to the master files, and to delete a copy also deletes the corresponding version of the master file stored elsewhere.
 
I don't quite follow you on the Dropbox question but I can confirm that the files in the File History folder are real copies of the originals with the exception (from memory) that they are time stamped and the properties changed to read only ?

I used to find it easier to browse manually for a file if I needed it, and then just copy and paste it as required.

As there has been rumour of File History being dropped in W10 (which I now use over W8.1) I no longer use it and found a better replacement in AOMEI backup software which also has a 'file sync' facility.

I don't know Dropbox well enough to be familiar with its quirks such as whether deleting the Dropbox folder actually deletes the stuff from the Cloud Storage.
 
Back
Top