home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 66,984 of 68,980   
   Tom Del Rosso to Herbert Kleebauer   
   Re: Poison characters in substring subst   
   17 Jul 17 02:45:14   
   
   From: fizzbintuesday@that-google-mail-domain.com   
      
   Herbert Kleebauer wrote:   
   > On 16.07.2017 21:02, Tom Del Rosso wrote:   
   >   
   >>>> Trying to change "%20" in a url into a space.   
   >   
   >> I prefer not to use delayed   
   >> expansion, if possible, because then ! is a poison character too.   
   >> There should be a way to do it with CALL.   
   >   
   > I don't think there is an easy way to do this. If in the   
   > url there is no other % than in %20 and there is a character   
   > not used in the url (e.g. $), then this should work:   
   >   
   > @echo off   
   > set url=xxx%%20yyy   
   > set url   
   >   
   > call :sub $1 $2 $3 $4 $5 $6 $7 $8 $9   
   > set url   
   >   
   > goto :eof   
   >   
   >> sub   
   > call set url=%url%   
   > set url=%url:$20= %   
      
   That's great.  Picking a character that isn't used is easy because the   
   only colon is after http and I can remove it.   
      
   Thanks.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca