Windows users who want to clean out their old FCStd1 files:
It goes without saying, but I'll say it anyway, be careful, really really careful with del and wildcards (* and ?) as misuse can lead to deleting the wrong files, and del is not recycle bin aware, so no way to recover, at least not easily. Backup your files first before doing any of this. Then if you are satisfied with the outcome you can remove the backups. Don't blame me if you fail to do this.
From command prompt (probably need administrative privileges) :
Note: the /S parameter means to do this for the current folder and also for all subfolders.
Or if you want to rename them so they can be opened in FreeCAD:
But this only works for the current directory as ren has no support for /S parameter.
If you want to hide all the .FCStd1 files:
If you'd like to move all FCStd1 files in all subfolders to a backup folder:
Code: Select all
mkdir ..\freecad_backups
xcopy *.FCStd1 ..\freecad_backups /s
del *.FCStd1 /s
First line creates the backup folder as a sibling to the current parent directory. You would need write permission in that folder.
Second line copys all FCStd1 files in current and all subfolders to the backup folder
Third line deletes all of the FCStd1 files in current and all subfolders.
You don't really need the first line above because xcopy will create the directory for you if it doesn't already exist, but by doing it manually in the first line you will get an error message if you don't have administrative authority before trying the xcopy in the next line.
The folder heirarchy is kept in the backup folder. If you want to trash the backup folder and all of its contents probably the best to do that is through the GUI in Explorer. There was an old command call deltree that could do it from the command line, but that seems to have been removed.
If you want to mark your FCStd files as read only:
That would protect them from accidental deletion. Then to remove the readonly attribute:
If you changed the preferences to have more than 1 backup file at a time you would also have some *.FCStd2 files, etc. In that case to remove those you should first mark the regular .FCStd files readonly, then proceed to delete the backups.
Make certain the attrib +r bit worked before proceeding. If it doesn't the second line below will delete all of your FCStd files!
Code: Select all
attrib +r *.FCStd /s
del *.FCStd? /s
attrib -r *.FCStd
You will get access denied messages for the write-protected *.FCStd files, which won't be deleted, but all the FCStd1 FCStd2, etc. files will be deleted. The "?" only matches a single character, so if you had more than 9 backups per file it won't catch some of them. Can use del *.FCStd* instead in that case.
You can see the attributes of the files:
This should produce a directory listing with R next to those files that are marked readonly.