1

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...

  • 2
    Please describe exactly what you tried. – Scott Mar 14 '13 at 4:54
1

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.

| 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 – Sabilv Mar 14 '13 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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