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 68,882 of 68,980   
   R.Wieser to All   
   Re: Working batch script to append to th   
   24 Jan 25 08:32:06   
   
   XPost: alt.comp.os.windows-10, alt.msdos.batch   
   From: address@is.invalid   
      
   Arlen,   
      
   >   echo.Enter URL: set /p "url="   
   >   echo.Enter Description: ; e.g., Amazon Vine Program   
   >   set /p "description="   
   >   :append_html   
   >   echo.^%description%^^ >> %bmfile%   
      
   That will work as long as you're not using one of HTML's special chars,   
   like, from the top of my head,  "&", "<" and">".    Especially the "<" will   
   cause problems   
      
   IOW, you need to sanitize the users input.   
      
   Luckily your other post already contains the solution method :   
      
   > :replace_spaces_with_+   
   >  set "amazon_item=%item: =+%"   
      
   And by the way: did you know that you can have "set /p" display a bit of   
   text before displaying the input prompt ?   Like this :   
      
   set /p "url=Url: "   
      
   Regards,   
   Rudy Wieser   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

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


(c) 1994,  bbs@darkrealms.ca