[VB]Entering a randomly named folder

Discussion in 'Mixed Languages' started by QuantumBug, Mar 3, 2013.

  1. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,488
    1,322
    60
    #1 QuantumBug, Mar 3, 2013
    Last edited: Mar 3, 2013
    Simply, for a backup tool I've created I need to detect a file that is in a randomly named folder based off XBL signing.

    I need the enter this folder 'C:\Users\Leroy Jenkins\Saved Games\Lionhead Studios\Fable 3\90000018D3789\' to detect a file inside exists. But the folder in bold is always randomly named.

    What would be the best way to enter that randomly named folder? This is probably simple but it's something I've never done before.

    Thanks, The Dev.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,462
    419
    60
    #2 PAYMYRENT, Mar 3, 2013
    Last edited by a moderator: Apr 20, 2017
    Ok you need to assign the name to a global variable in your class and then use it when you need it.

    Code:
    Private folderName as String = 90000018D3789 ' <-- Replace at runtime with your new random name
    
    
     
  3. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,462
    419
    60
    or you arent creating the folder... if you arent then you need to find the folder with a directory search for that file name....

    and then use IO.FileInfo(path).Directory.FullName to get that folder