Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1678

How to use *just* the current folder name in a variable

$
0
0
I am in a subfolder. Oh, let's call it: \\mycomputer\c\myfolder\mysubfolder.

I want to grab just the subfolder name to set as a variable. In other words, the stuff to the right of the rightmost backslash.

%_CWD comes close, but I don't want the full directory structure, just "mysubfolder".

Advice on how to do that? Split off the directory structure, just return the folder name?

Thanks.

Viewing all articles
Browse latest Browse all 1678

Trending Articles