Solved

parse input paramaeter of a batch file

Posted on 2003-12-08
1
828 Views
Last Modified: 2008-02-01
Hi!
I get parameters in a batch file but I get them '"' (like: "AAA").
I want to strip them from the '"' if they have such.
Is there a way to do this?
Thanks!
0
Comment
Question by:rzvika2
1 Comment
 
LVL 5

Accepted Solution

by:
brianadkins earned 50 total points
ID: 9896104


Couple ways to do this:

Strip off first and last characters:
     set VAR=%VAR:~1,-1%

or

Replace all quotation marks with nothing:
     set VAR=%VAR:"=%

-Brian Adkins
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to print and extire folder structure 6 46
Windows 7 Pro - Pause Not Pausing In Batch File 24 60
MailSend Attachments 41 168
bat script to open stickynote with text 3 100
Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question