nekokk Posted October 18, 2006 Share Posted October 18, 2006 How to get path of a file that I selected? for example,now I right-clicked on a file on desktop, then how can I get the path of the file? are there a function or a way can get the path of the file? thanks for your help! Link to comment Share on other sites More sharing options...
The Kandie Man Posted October 18, 2006 Share Posted October 18, 2006 How to get path of a file that I selected? for example,now I right-clicked on a file on desktop, then how can I get the path of the file? are there a function or a way can get the path of the file? thanks for your help! Right click the file, click properties and then look for where it says "Location:". That is where your file is located. If you want autoit to do this, that would make no sense because the way a file is identified is by its filename and if you don't know the file's filename then, um, it can't be done. However, you could create a script that gets the path of its current location and simply copy and paste that script to different places and run it. The script would then tell you where it is and in turn you would know what folder all the other files with the script are in. Something like this could be done: Msgbox(0,"Script's Current Directory:",'The Script is currently in: "' & @ScriptDir & '\"') "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
nekokk Posted October 29, 2006 Author Share Posted October 29, 2006 Right click the file, click properties and then look for where it says "Location:". That is where your file is located. If you want autoit to do this, that would make no sense because the way a file is identified is by its filename and if you don't know the file's filename then, um, it can't be done. However, you could create a script that gets the path of its current location and simply copy and paste that script to different places and run it. The script would then tell you where it is and in turn you would know what folder all the other files with the script are in. Something like this could be done: Msgbox(0,"Script's Current Directory:",'The Script is currently in: "' & @ScriptDir & '\"') Thanks for your reply Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now