vb6drive-letter

How do i get drive letter for a running form


I need to get the letter of the drive my form is running from. The reason why i need this, is because i'll be copying a text file (from the removable drive in which the form will be) to the computer. Is it even possible? If yes could someone help me with the code?

NOTE I'm using Visual Basic 6


Solution

  • Dim disk_letter As String
    disk_letter = Left(CurDir$(), 1)
    

    That was all.