I'm trying to translate a very simple (Unix) shell script into a "batch file". I have most of it down, except for the line
CURRENTDIR="$PWD"
How can I translate this to "batchese"?
Thanks!
$PWD means The current working directory as set by the cd command.
The %~dp0 Variable. The %~dp0 (that's a zero) variable when referenced within a Windows batch file will expand to the drive letter and path of that batch file. The variables %0-%9 refer to the command line parameters of the batch file.
To display the command prompt, type echo on. If used in a batch file, echo on and echo off don't affect the setting at the command prompt. To prevent echoing a particular command in a batch file, insert an @ sign in front of the command.
The simplest form:
SET CURRENTDIR="%cd%"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With