System Properties Window for Changing Environment Variables

Often time, I want to access Environment Variables on Windows. I would usually get to the old Control Panel –> System –> Advanced system settings –> Environment Variables…

Too many steps. You can directly open System Properties window by executing SystemPropertiesAdvanced from Run (right click Windows button and Run).

Or if you can remember this, you can directly open  Environment Variables window.

rundll32.exe sysdm.cpl,EditEnvironmentVariables

I don’t think I’m going to remember it so maybe I will create a batch file.

Just some Windows tips and tricks. 🙂

How to Delete Paths Longer Than 260 Characters on Windows

There are times somehow someone or some process managed to create files or directories longer than 260 character limit on Windows. If you try to delete them, Remove-Item or any other delete attempt errors out because well, Windows can’t really handle the long path well.

Here is a trick. Robocopy can deal with something like that pretty well. Here are the steps.

  1. Create an empty folder such as C:\empty
  2. Execute the following robocopy command to mirror the empty folder with the destination folder you want to clean up.
    robocopy C:\empty C:\some\path\you\wanna\clean /MIR

    Rocopy for the rescue!