1

A few days ago, I relocated my user data folders ("C:\Users\Me\Documents", "C:\Users\Me\Downloads", "C:\Users\Me\Videos", etc.). I set the new location to "D:\Documents", "D:\Videos", etc, to save space on my system drive (SSD).

I am aware about problems that occur if you move the location of the entire Userprofile ("C:\Users\Me\") to another drive, but for my, I did only move subfolders of it - so I wonder if these problems also apply to my case.

However, I wanted to run a batch script today, which uses some programs whose locations are defined in the PATH. The script failed. It could not find perl. I saw after that entering "path" in the CMD prints out "PATH=(null)". So far, this is the reason why perl and other programs can't be found, obviously. But I wonder if the empty PATH could be a result of my folder relocation and if I should propably undo it. Or is there any other way to solve that? The script I want to run is very essential for my daily work, I use it often and it seems like it just broke because of the relocation I did.

My OS is Windows 8.1 Pro.

Paul H
  • 121
  • 1
  • What do you see if you print in the CMD "path"? Is it really empty? In this case you need to rebuild it by pointing to new location (D:/...) – Leo Chapiro Jun 01 '17 at 13:42
  • Well, I type "path", and the answer is: PATH=(null). I also checked Windows' Environment Variables dialog, where I can also see that PATH is empty... – Paul H Jun 01 '17 at 13:46
  • This is really strange: there are such entries as C:\Windows; C:\Windows\system32; - you have not re-locating your Windows installation I guess? – Leo Chapiro Jun 01 '17 at 13:50
  • Nope, just the user folders. The complete list of subfolders that I moved from "C:\Users\Me\" to "D:\" is: "Desktop", "Documents", "Downloads", "Music", "Pictures" and "Videos".. – Paul H Jun 01 '17 at 13:52
  • Take a look: https://superuser.com/questions/523688/deleted-path-environment-variable-how-to-restore – Leo Chapiro Jun 01 '17 at 13:53
  • Also already found this thread. But echo %PATH% did not help for me. I just used Process Explorer to see the value of PATH for some running processes. Checked it on explorer.exe - there is not even a PATH visible in the Environment tab of the process properties. I'm not sure if this is normal, but it seems strange to me – Paul H Jun 01 '17 at 13:56
  • You can either update the PATH environmental variable to include the new location, or always use the full path, to the new location. Its entirely up to you, the variables that point to those locations, are handled within the registry and would have to be manually updated. Best not to change them yourself without understanding the side effects of doing so. There is a reason while possible, this procedure you performed, isn't actually a supported configuration – Ramhound Jun 01 '17 at 14:18
  • Just tried to do a system restore to a point before I relocated the folders. Did not help. Same problem. How can I update the path to include the new location, if the path is completely empty? – Paul H Jun 01 '17 at 14:34
  • I have to correct my last comment. It was not a system restore point *before* the relocation. I just mixed up something there. Stupidly, I don't have any system restore point *before* the relocation, because I did the relocation together with some other cleanup work, which also included deleting Windows' system restore points (I hardly needed some space on my system drive) – Paul H Jun 01 '17 at 15:39

0 Answers0