lundi 24 mars 2014

Is it possible to have the windows batch command line interpret ~ as %USERPROFILE%?


Vote count:

0




I'm wondering if there is any modification I can perform to the windows registry or creating some wrapper around cmd.exe which allows ~ to be interpreted as %USERPROFILE%


The basic use case is that I have a large number of simple bash scripts which are only incompatible with windows batch because of the ~. I have scripts to convert bash to bat, but most of the time I use these I simply open the file and copy-paste the line into my command prompt. On windows I always have to sub in %USERPROFILE% for ~.


Something else that would work is if I could make windows look at environ variables like: $var as %var%


I doubt there is anything I can do to get the copy-paste functionality that I want, but I figured I'd at least ask.



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire