Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8733387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:38:24+00:00 2026-06-13T09:38:24+00:00

I cannot find a solution as how to chop off part of a string(filepath)

  • 0

I cannot find a solution as how to chop off part of a string(filepath) and use what’s left to get another string.

For example: if I have filepath: Q:\2456_blah_blah\file.txt and I want to put this entire filepath into an array and delete from left characters 0 through 8 (which is consistent for my application) so I’d have ‘blah_blah\file.txt’ left for my array.

(The blah_blah portion is going to be a dynamic length, but it will always be letters.)

So then I’d like to take the ‘blah_blah\file.txt’ and pull just from that beginning up to the next ‘\’ symbol, getting “blah_blah” as a string. I’m not too savy with VB strings at this point, so any help would be much appreciated. This is just my thinking how it could be done, if there’s a simpler solution, I’m all ears.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:38:25+00:00Added an answer on June 13, 2026 at 9:38 am

    Two Substring calls should do it.

    Dim str As String = "Q:\2456_blah_blah\file.txt"
    str = str.Substring(8, str.Length - 8)
    Dim blah As String = str.Substring(0, str.IndexOf("\"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot find the solution for this problem, here is the simplified example: On
Similar questions have been asked but cannot find a solution that works well. What
I have this problem and i just cannot find a solution to it. I
I have searched the web but I cannot find the solution to my problem.
I have searched all morning and yesterday afternoon and still cannot find an solution
I have a very simple problem but cannot find a nice solution. I have
I have encountered a problem i cannot find a solution. I am using a
I get the following error message and I cannot find the solution in the
I have a very simple task, but I cannot find any solution. I have
Cannot find a solution to seem to be a simple question. For example, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.