Is it possible to have the windows batch command line interpret ~ as %USERPROFILE%? -
i'm wondering if there modification can perform windows registry or creating wrapper around cmd.exe allows ~ interpreted %userprofile%
the basic use case have large number of simple bash scripts incompatible windows batch because of ~. have scripts convert bash bat, of time use these open file , copy-paste line command prompt. on windows have sub in %userprofile% ~.
something else work if make windows @ environ variables like: $var %var%
i doubt there can copy-paste functionality want, figured i'd @ least ask.
this code can automate - it's native windows sed-like tool.
this uses helper batch file called repl.bat - download from: https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat
place repl.bat in same folder batch file or in folder on path.
type script.file |repl "~" "\x25userprofile\x25" x >new.script.file
Comments
Post a Comment