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

x
?
Solved

the folder name in batch command

Posted on 2011-10-07
2
Medium Priority
?
256 Views
Last Modified: 2012-05-12
hi guys,

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

Accepted Solution

by:
Ikelca earned 0 total points
ID: 36934834
found a solution myself
0
 
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.
0

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