Skip to content

Instantly share code, notes, and snippets.

@abakum
Last active February 28, 2018 06:09
Show Gist options
  • Save abakum/ffd24a8c4da2fa627847866cae854ffa to your computer and use it in GitHub Desktop.
Save abakum/ffd24a8c4da2fa627847866cae854ffa to your computer and use it in GitHub Desktop.
.lnk for PortableApps
echo set variable %~n0 of global environment as path to this script without slash on the end
cd /d %~dp0
setx %~n0 %cd%
cd /d %~dp0
call :wd %cd%
goto end
:wd
echo set variable %~n1 of global environment as path to this script without slash on the end
setx %~n1 %cd%
:end
:Place this script in %USERPROFILE%\SendTo
cd /d %1
call :wd %cd%
goto end
:wd
echo set variable %~n1 of global environment as path to folder without slash on the end
setx %~n1 %cd%
:end
@abakum
Copy link
Author

abakum commented Feb 16, 2018

1)Copy PortableApps.bat to c:\msys32
2)Rename it as MSYS2.bat
3)Run it
4)Use in total/double Commander as cd %MSYS2%/home/%USERNAME% to go to ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment