1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development [solved] VB.NET File Location finder

Discussion in 'Tech Support' started by C-Sniper, 15 Jul 2011.

  1. C-Sniper

    C-Sniper Stop Trolling this space Ądmins!

    Joined:
    17 Jun 2007
    Posts:
    3,028
    Likes Received:
    126
    Hey all,

    I am trying to create a program that back's up specific files on my PC. I am currently using the GetDirectories() function since the directory that I am pulling from has a randomized string of characters so I have to use RegEx's to get the static part of the directory. This however, causes the data type to be multiple string and I can then no longer use it as a single string. There is only 1 directory that will match the description I have set, so I am wondering if there is a way to use only a string and not a multiple string.

    Here is my code:

    Code:
    Dim keydb, keyfile As String
            Dim Profile As String = My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData + "mydir"
            Dim base As New DirectoryInfo(Profile)
            Dim maindir() As DirectoryInfo = base.GetDirectories("*.xyz") 
    For this code, How do I get maindir() as a single string and not a multiple string?


    Thanks

    --edit--

    After more searching online, i found a way to get what i wanted with a for loop.
     
    Last edited: 15 Jul 2011
  2. thehippoz

    thehippoz What's a Dremel?

    Joined:
    19 Dec 2008
    Posts:
    5,780
    Likes Received:
    174
    be nice to see the solution :D
     

Share This Page