string manipulation

  • Thread starter Thread starter Eugene Anthony
  • Start date Start date
E

Eugene Anthony

Path:


images/5/Video1/qbert.flv


How do I retrieve images/5/Video1/ from

images/5/Video1/qbert.flv. This path

images/5/Video1/ can be different as in

Video1....Video100 and so on. I know that

we can use substring but the problem is

specifying the end position for retrieval.


How is it done?


Eugene Anthony
 
Hi Eugene,

Try using Path.GetDirectory(path). You'll end up with images\5\Video1, so if you want images/5/Video1/ you will have to string.Replace \ with / and add a / at the end as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

File Exist 5
Redirection Handling 2
session 1
Need help to download files 2
Video adapter question second try. Dual monitor 4
string manipulation 4
Using VBA to trigger a certain slide 0
Attachments 1

Back
Top