Skip to content

Corrected incorrect syntax in "%%A~dnpA".#4

Open
GitMew wants to merge 1 commit intoEposVox:masterfrom
GitMew:patch-1
Open

Corrected incorrect syntax in "%%A~dnpA".#4
GitMew wants to merge 1 commit intoEposVox:masterfrom
GitMew:patch-1

Conversation

@GitMew
Copy link

@GitMew GitMew commented Jul 15, 2021

It should be %%~dpnA. Here's the full reasoning:

  1. Variables in batch files have two % symbols as prefix;
  2. A variable A in a for loop can be accessed with augmented notation %%~...A.
  3. The augmentations d, p and n retrieve the drive name, parent path and file name respectively. Hence, %%~dpnA.

It should be `%%~dpnA`. Here's the full reasoning:
1. Variables in batch files have two % symbols as prefix;
2. A variable `A` in a for loop can be accessed with augmented notation `%%~...A`.
3. The augmentations `d`, `p` and `n` retrieve the drive name, parent path and file name respectively. Hence, `%%~dpnA`.
@utkustnr utkustnr mentioned this pull request Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant