ExifTool Forum

General => Other Discussion => Topic started by: elhiero on March 24, 2025, 06:29:19 PM

Title: Send an URL with anchor (#) from cmd to default internet browser
Post by: elhiero on March 24, 2025, 06:29:19 PM
I'm adding some "help" links to my CCE software.

When I tried to send "https://exiftool.org/exiftool_pod.html#Utilities" to my internet browser from a cmd window, (or, in fact from my CCE.jar program) , the cmd utility intercepts the # character.

cmd /c start "" "https://exiftool.org/exiftool_pod.html#Utilities" -> the anchor will be lost.
None of the AIs found a simple solution ...

The workaround is :
set xyz="#Utilities"
cmd /c start "" "https://exiftool.org/exiftool_pod.html%xyz%"
Title: Re: Send an URL with anchor (#) from cmd to default internet browser
Post by: StarGeek on March 24, 2025, 07:58:42 PM
Maybe it's a browser problem? My default is Firefox, and copy/pasting your first command to CMD/PowerShell properly opens the link at the correct anchor point.

Maybe try escaping the hashtag with a caret ^
Title: Re: Send an URL with anchor (#) from cmd to default internet browser
Post by: elhiero on March 25, 2025, 05:53:31 AM
Right, I made a mistake in my scripts, a full Internet url can be send through cmd.
Thanks for your feedback, I can now clean my program for Internet links.

The problem stays for local urls
( start "" "file:///C:/CCE/test/ExiftoolComplements/html/exiftool_pod.html#Utilities" ) : the anchor is deleted.
No workaround neither esc character , I'll use another process ...