How to get the name of the current directory without absolute path - Microsoft Windows

This is a discussion on How to get the name of the current directory without absolute path - Microsoft Windows ; What is the command to get the name of the current directory without absolute path ? for example... if i am in C:\folder1\folder2\folder3\ command should print only folder3. echo %CD% print the absolute path....

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to get the name of the current directory without absolute path

  1. How to get the name of the current directory without absolute path

    What is the command to get the name of the current directory without
    absolute path ?
    for example... if i am in C:\folder1\folder2\folder3\
    command should print only folder3.
    echo %CD% print the absolute path.


  2. Re: How to get the name of the current directory without absolute path

    On 7 May 2007 11:52:39 -0700, Dhirendra Singh wrote in
    comp.os.ms-windows.misc:

    >What is the command to get the name of the current directory without
    >absolute path ?
    >for example... if i am in C:\folder1\folder2\folder3\
    >command should print only folder3.
    >echo %CD% print the absolute path.


    Trivial with 4DOS/4NT:
    SET CD1=%@WORD["\",-0,%CD]

    4DOS is free, 4NT is a commercial program. The function @WORD[] is
    documented at .

    --
    Michael Bednarek http://mbednarek.com/ "POST NO BILLS"

+ Reply to Thread