decoding questionmark in batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Elogia
Posts: 3
Joined: 25 Mar 2019 02:58

decoding questionmark in batch

#1 Post by Elogia » 25 Mar 2019 03:02

I made a script which opens all .html files in folder and subfolder and appends "?clicktag=https://net.hr" to it, but the questionmark gets encoded, can anyone help?

Code: Select all

@ECHO ON 
SET RootDir=%cd%

CD /D "%RootDir%"
FOR /F "TOKENS=*" %%A IN ('DIR /S /B "index.html"') DO start chrome "%%~A?clicktag=https://net.hr"
GOTO EOF
Anyone has an idea?

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: decoding questionmark in batch

#2 Post by Squashman » 25 Mar 2019 15:27

Could please provide an example.

Elogia
Posts: 3
Joined: 25 Mar 2019 02:58

Re: decoding questionmark in batch

#3 Post by Elogia » 26 Mar 2019 01:21

So if i start the script in a folder, i want it to open every index.html file and append "?clicktag=https://net.hr", so it would look like "C:/intel/Document.html?clicktag=https://net.hr" but instead it appends "%3Fclicktag=https://net.hr"
do you know how to push so it does not encode the "?"

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: decoding questionmark in batch

#4 Post by Squashman » 26 Mar 2019 08:57


Elogia
Posts: 3
Joined: 25 Mar 2019 02:58

Re: decoding questionmark in batch

#5 Post by Elogia » 26 Mar 2019 10:17

Squashman wrote:
26 Mar 2019 08:57
Looks like this will help you.

https://productforums.google.com/forum/ ... jsGuMPWDUJ
Wow, thank you very much :)

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: decoding questionmark in batch

#6 Post by Squashman » 26 Mar 2019 10:53

Elogia wrote:
26 Mar 2019 10:17
Squashman wrote:
26 Mar 2019 08:57
Looks like this will help you.

https://productforums.google.com/forum/ ... jsGuMPWDUJ
Wow, thank you very much :)
Thank Google for such a robust search engine. All I did was search for your problem. It was the second link in the search results.

Post Reply