开发者

File Association - How to insert file name as a command line argument

I know how to associate certain file extensions in a deployment project but when one of those files is opened I want to 开发者_JAVA百科pass the file name to my application to proceed with the correct action.

I can specify what to send as a command line argument in the File Types tab of my deployment project as seen in Img 1.

File Association - How to insert file name as a command line argument

How can i get the actual file name of the file that was opened to be used as the value of Arguments?


Use "%1" in place of "%FileName". Make sure you surround it in double-quotes, so that you properly get filenames with spaces in the name or path. If your app can accept more than one filename, or need more than one parameter, treat them the same way, using "%2" and so forth. Make sure each one is separated from the others by a space, and surround them with double-quote characters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜