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 8098173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:59:47+00:00 2026-06-05T21:59:47+00:00

Basically, I’m trying to do some string manipulation to edit directories. I found some

  • 0

Basically, I’m trying to do some string manipulation to edit directories.
I found some code to try and edit the directories, but when I use it it doesn’t recognise ‘right’ as being a function and only recognises it as a right property, thus producing an error.

I was wondering if there’s something I haven’t imported or if perhaps ‘right’ is an obsolete function that was used in VB6 but replaced with something.

The code I have is as follows:

Dim Foo As String
Dim Bar As String
Bar = 'some form of directory input i.e. my.computer.currentdirectory
Foo = right(Bar, (Len(Bar) - InStrRev(Bar, "/")))
MsgBox(Foo)

Ideally I need either a better method of manipulating directories or a way to get the ‘right’ functionality working.

  • 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-05T21:59:50+00:00Added an answer on June 5, 2026 at 9:59 pm

    Look up System.IO.Path – has lots of useful tools for this stuff. You’ll want GetDirectoryName and GetFileName especially. They work on directories as well as filenames.

    Bar = "C:\Dir1\Dir2\Dir3"
    Foo = IO.Path.GetFileName(Bar)  'now = Dir3
    Foo = IO.Path.GetDirectoryName(Bar)  'now = C:\Dir1\Dir2
    

    http://msdn.microsoft.com/en-us/library/system.io.path.getfilename
    http://msdn.microsoft.com/en-us/library/system.io.path.getdirectoryname

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I have some simple code that does some things for files and I'm
Basically I have some code to check a specific directory to see if an
Basically I have some variables that I don't want to preinitialize: originalTime = None
basically i have (state, state code) pairs, that are subsets of country [USA] ->
Basically, what I'm trying to create is a page of div tags, each has
Basically what I'm trying to do is make a very simple vertical bullet projectile
Basically, I have a JTextPane to hold some text which I wish to style.
Basically I am writing a simple bit of code to increment every one second
Basically i'd like to allow an arbitrary (but not empty ) number of key-value
Basically my question is, if I have a number string, and i'm going to

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.