vb.net - How to get the full path of a file through the file's name -
I'm trying to get the path of a file named after it. I have created an executable file on my desktop, command.xa , I am trying to get this full path through the console application. I want to find my entire computer for the file, (this is on my desktop for simplicity) and will return the path, it should be kept in mind that the file can be anywhere. The path I want to return is the program: "C: \ user \ jimbob \ Desktop \ Commands.exe" My code: but instead prints it " C: \ Users \ Jimbob \ Documents \ Visual Studio 2012 \ Projects \ Get Path Test \ Path Test \ Bin \ Debug \ Commands.exe " This is the path to the project of all my code In this way, the debug folder does not even have command.xa . Help? Or you can not just
Import system. IO module module 1 slow file location string as filename string = "command.xa" sub head () fileLocation = path. GetFullPath (filename) console.light line (file location) console.readline () end sub-end module
dim filename string = My DirectoryPath as an application.Info () & amp; "\ Commands.exe"
Comments
Post a Comment