Monday, December 26, 2016

Free Up Spare Hard Drive Space On Every Reboot

I've figured out a way to clear out any temporary files and folders that Windows uses by using automated batch files. Batch files are simple computer command executions that run through the Windows command line prompt that is similar to DOS. If you want to use this method, the instructions are further down in this post.

The reason I went about finding ways to free up hard drive space was because I kept getting odd errors in PhotoShop. The error message said something like Error: can't open file because Scratch Disks are full. Translation was that PhotoShop could not find enough temporary hard drive space on my computer. Most people won't even have PhotoShop installed on their PC but the benefits of freeing up space on your computer spans much further than just a single app and is helpful in almost every way possible.

First Step - Enable viewing of hidden folders and files
We are enabling viewing of the hidden folders so that we can access a certain folder where temporary files are stored so that they can be deleted by the batch files later.

--> For Windows 10 and Windows 8 - open any drive or folder on your computer.
--> click on the menu "View" --> "Options" --> click on the tab "View"
--> at the bottom of that window look for items with checkboxes and make sure the option beside "Show hidden folders, files, and drives" is selected with a black circle beside it. Click on the "Apply" button and then the "OK" button to close it.

--> For Windows 7 - open any drive or folder on your computer.
--> click on the menu "Organize" --> select "Folder and search options" --> click on the tab "View"
--> at the bottom of that window look for items with checkboxes and make sure the option beside "Show hidden folders, files, and drives" is selected with a black circle beside it. Click on the "Apply" button and then the "OK" button to close it.



Second Step - Find your main User Account Name.
- Browse to your main Operating System hard drive which is usually the C:/ drive for most people.
     ---> then open the "Users" folder
     ---> then look for the main user name of the computer. The list will look something like this:
               - Default
               - UserName
               - LocalService
               - NetworkService
               - Public
     ---> the main user name in this case is "UserName" but it will be different on your own computer.
     ---> make a note of it because we are going to use it when editing the first batch file so that it works.

           
 Third Step - Download my custom batch files by clicking the links below.
--> Batch File 1: clear temp app data.bat
[ https://drive.google.com/open?id=0B7tRqAQPpWGTRWRETWhUcC1oTnM ]
--> Batch File 2: clear windows temp data.bat
[ https://drive.google.com/open?id=0B7tRqAQPpWGTQkVYamFWTXJjSEk ]


Fourth Step - Edit Batch File 1: clear temp app data.bat
Once "clear temp app data.bat" has been downloaded, locate where you saved it, and the right-click on it.
--> select "edit"
--> it should open within the app called Notepad. If not you'll need to open it with Notepad.
--> look at the second line and where it says "UserName", replace it with the one that you found in step 2.
--> close Notepad and save the changes to the file.


Fifth Step - Copy the Batch Files to Windows Startup
--> find where you saved both batch files "clear temp app data.bat" + "clear windows temp data.bat" and select them both.
--> right-click and select "copy"
--> press the Windows Key + R key together
--> type "shell:startup" without the quotation marks and press the "Enter" key. This will open the Windows startup Folder.
--> right-click anywhere in the folder and select "paste"
--> close all open windows.
--> That's it folks. Now every time that Windows starts up or when your computer reboots, temporary files and folders will be safely deleted and will free up hard drive space automatically. Restart your computer to test it out.

No comments:

Post a Comment