Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a problem: I want to get the filename only from this path line in Command Prompt

Here's my path:

\\jktfile-01\lsmk\SRP\BankPelapor\201209\Instance\2882000-2012-09-30-BSMS26.xml

What kind of command should I do?

I already tried this solution How to get filename only without path in windows command line?

but it didn't work...

share|improve this question
2  
Please describe exactly what you tried. –  Scott Mar 14 '13 at 4:54
add comment

1 Answer 1

up vote 1 down vote accepted

Dir /b \\jktfile-01\lsmk\SRP\BankPelapor\201209\Instance\*.xml

will output

2882000-2012-09-30-BSMS26.xml

along with all other .xml files.

Not 100% sure what you are asking for though.

share|improve this answer
    
I believe the OP is looking for dir /b \\jktfile-01\lsmk\SRP\BankPelapor\201209\Instance\2882000-2012-09-30-BSMS26.xml, which will output just 2882000-2012-09-30-BSMS26.xml. –  Scott Mar 14 '13 at 5:53
    
@Scott Yep i want to get the file name from the line of link that i got, thx –  Sabil Valdano Mar 14 '13 at 7:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.