Where It All Started.

Where It All Started.

Life, Stock Trading, Investments, Business and Startup. Most are programming stuff.

Tag: windows 10

Moving ProgramData Folders To Other Drive Using Windows 10

My C: drive became full, and it came to my mind that its hard to move files to a new SSD1 if I buy new one.

So it got me into thinking what are the things I can do to remove and free up space in my C: drive?


I don’t know where I’m going from here, but I promise it won’t be boring.

— David Bowie.

The first thing that comes up, is using the tool Disk Cleanup bundled with Windows 10. It only freed up 10Gb of data, then I check all the folder size which contains the largest amount of data.

The result was my user account and the ProgramData folder.
Here are the things I did in order to move ProgramData contents to my other spare drive.

DISCLAIMER: Before doing this on your machine please test and research first each command before executing on your machine / production environment.

First, I copied and mirrored the ProgramData folder structure and ACL’s2 using the command robocopy. The /MIR flag tells robocopy to retain security settings and state of file.

robocopy /XJ /MIR "C:\ProgramData" "D:\ProgramData"

You could also use this other command flags, this command is non-destructive unlike the mirror flag. The mirror flag deletes the file at destination while this just overwrites and retain if missing in source.

robocopy /xj /s /copyall C:\ProgramData D:\ProgramData

After everything’s done copying, you start creating junction links and symlinks3 from your spare drive (for me its the D: drive). The %~NA tells the batch command it will only get the base folder name, and the %~A gets the whole absolute path. The command below will only create directory junctions to begin with:

FOR /D %A IN ("D:\ProgramData\*") DO (MKLINK /J "C:\ProgramData\%~NA" "%~A")

This next command, specifically create symbolic links to file from source to destination.

FOR %A IN ("D:\ProgramData\*") DO (MKLINK "C:\ProgramData\%~NXA" "%~A")

Then after that restart your machine, and ensure everything’s working fine. I think some folders like Microsoft and Packages should be excluded in copying and making junctions.

That’s all guys. If you have any question DM me or comment in this post.


  1. A solid-state drive (SSD) is a solid-state storage device that uses integrated circuit assemblies to store data persistently, typically using flash memory, and functioning as secondary storage in the hierarchy of computer storage. It is also sometimes called a solid-state device or a solid-state disk, even though SSDs lack the physical spinning disks and movable read–write heads used in hard disk drives (HDDs) and floppy disks. ↩︎
  2. An access-control list (ACL) is a list of permissions associated with a system resource (object). An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects. ↩︎
  3. A symbolic link (also symlink or soft link) is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. ↩︎

Reset Start Menu Layout Windows 10

Success is neither magical nor mysterious. Success is the natural consequence of consistently applying basic fundamentals.

— E. James Rohn.

Just recently on my Windows workstation a bug occurred on which the Recycle Bin doesn’t refresh its icon on desktop. I know for a fact that I’ve recently deleted some file so there should be contents inside the bin.

Let’s jump in!

What are the steps to reset explorer?

Here are the steps I’ve created for when I do not need to restart the PC to reset overall explorer settings or when its has flaw.

  1. Open the “Run command” window by pressing WIN+R.
    (i.e. hold down the Windows key and then press R.)
  2. Type cmd at the prompt, and press Enter.
  3. Wait for the command prompt to open.
    (It will be a flashing cursor block.)
  4. At the command prompt, type this: taskkill /IM explorer.exe /F You should notice these all vanish: Start Menu, Taskbar, any open File Explorer windows.
  5. Type this at the command prompt explorer.exe. Now those components should all load back in.
  6. Close the command prompt and try the Start Menu or Desktop. Hopefully it should have refreshed.

That’s it all done!

Conclusion

If there is a bug, there is always a workaround. Anyways, I’ve already reported the bug Microsoft feedback.

Follow me for similar tips and tricks at @ffimnsr.