Page 1 of 1

How do I remove a certain part of a variable?

Posted: 11 Nov 2010 19:00
by screwed124816
for example, if i set a variable as the date, 11/11/2010, what command could i use to remove the "/", making the variable 11112010?

Re: How do I remove a certain part of a variable?

Posted: 12 Nov 2010 02:20
by amel27

Code: Select all

@set var=11/11/2010
@set var=%var:/=%

@echo %var%
@pause>nul