[Last Call] Learn how to a build a cloud-first strategyRegister Now


the folder name in batch command

Posted on 2011-10-07
Medium Priority
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

Ikelca earned 0 total points
ID: 36934834
found a solution myself
LVL 43

Expert Comment

by:Steve Knight
ID: 36935523
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Loops Section Overview

834 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