简体   繁体   中英

How to get path of a file

I want to print the path of a file. For example, I have a file named 'test'. Then, the program I want to make will print "C:\\Users\\username\\Desktop\\test". (Just example!) How can I make this?

您可以像这样使用 double \\ follow: “C:\\\\Users\\\\username\\\\Desktop\\\\test”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM