expand file names that have environment variables in their path

后端 未结 8 2077
礼貌的吻别
礼貌的吻别 2020-12-01 08:06

What\'s the best way to expand

${MyPath}/filename.txt to /home/user/filename.txt

or

%MyPath%/filename.txt to c:\\Document         


        
8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 08:25

    On Windows, you can use ExpandEnvironmentStrings. Not sure about a Unix equivalent yet.

提交回复
热议问题