the folder name in batch command

Posted on 2011-10-07
Last Modified: 2012-05-12
hi guys,

how do I get a folder name using batch file?
for example
i have got above path, but how do i get the last 0234 part??
I need to use DOS command in batch file.
Question by:Ikelca

    Accepted Solution

    found a solution myself
    LVL 43

    Expert Comment

    by:Steve Knight
    faie enough, just saw alert bit late sorry.  what did you use.  easiest is to use for command with %%A say pointing at the path and then %%~nA will be the last part of path for dir, or filename for file.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
    Synchronize a new Active Directory domain with an existing Office 365 tenant
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now