bubble
bubble

Reputation: 3526

Context menu not passing argument properly

I followed this post to create a right-click menu for my files. I have created a batch file which gets called along with the files being clicked as its argument. In the registry I have created and entry like this:

enter image description here

However, when a file contains spaces in the file path, the argument gets truncated. The batch file is works fine when the arguments are passed from command prompt.

How to resolve this?

Upvotes: 1

Views: 628

Answers (1)

walid toumi
walid toumi

Reputation: 2272

Try with double quote

Yourbat.bat "%1"

Or

Yourbat.bat "%~1"

Upvotes: 4

Related Questions