Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file associations automatically opening files #4

Open
davidmatten opened this issue Feb 9, 2017 · 4 comments
Open

file associations automatically opening files #4

davidmatten opened this issue Feb 9, 2017 · 4 comments

Comments

@davidmatten
Copy link

In a windows environment, it is common to double click on a file of a given type and have the associated software open that file.
With Dendroscope (to my limited understanding), it appears this is not the behaviour.

If I am wrong, please forgive me - and let me know how to achieve this behaviour.

@davidmatten
Copy link
Author

In an attempt to get around this, I have created a batch file to call Dendroscope, with an execute command following:
START C:\Dendroscope\Dendroscope.exe -x 'open file=%1'
Then told windows to open .nexus files with that batch file (See attached screen shot)
dendroscope2

The problem this throws up is it appears Dendroscope doesn't play nice with double quotes surrounding the file name. I was able to open the file, through dendroscopes menu items, and then the text generated in the command window reflects single quotes around the file name. See the attached screen shot for details.
dendroscope

@davidmatten
Copy link
Author

semi-solution found:
use a tilde between the percentage and the number.
%~1
This will remove double quotes surrounding the filepath.

1 similar comment
@davidmatten
Copy link
Author

semi-solution found:
use a tilde between the percentage and the number.
%~1
This will remove double quotes surrounding the filepath.

@davidmatten
Copy link
Author

The above doesn't work with spaces in the file path.
To deal with that edit your batch file to be:
SET filename=%1
SET filename=%filename:"='%
START C:\Dendroscope\Dendroscope.exe -x "open file-%filename%"

You can do this in one line - I have expanded it here so others can follow through with what steps are happening.

So, in summary: There is a way around the issue. Its detailed above. It would be rad if this could be included into Dendroscope.

(:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant