I tried to use this solution but it is outdated seeing as I use Windows 10 but I was wondering if there is anyway to add a option in the context menu to add a folder to the PATH because it is very annoying to keep modifying the PATH over and over again
This is already answered in Stackoverflow: https://stackoverflow.com/questions/31269312/adding-a-shell-context-menu-item-so-that-i-can-add-folder-to-path-by-right-click
Managed to find a permanent solution. Since setx sets the user path and not the system path, the command mentioned in my question will add all elements in the combined userpath + system path to PATH, effectively doubling its size every time you run the script.
This can either be fixed by removing user path, or as I did, add another user variable and append that to path. I then ended up with the following script afterwards to set the path correctly:
cmd /k setx UPATH "%%UPATH%%;%1%" && exit
This way I don't need to use a bat-file. Using double %s and &s seem to work as a way to escape the character, thus making it look like this to cmd:
setx UPATH "%UPATH%;drive:/theFolderYouRightClicked" & exit
I am still not sure why you have to pass this through cmd in order to see the PATH-variable, but at least this is a semi-clean way of solving my problem