>From set /? set Var1=%1# Sets "Var1" to first parameter passed to the batch file (%1) and appends a "#"
set Var1=%Var1:"=%
Removes all occurrences of the double-quote character in Var1
set Var1=%Var1:\#=%
Removes all occurrences of "\#" in Var1
set Var1=%Var1:#=%
Removes all occurrences of the hash character ("#") in Var1
Ken Cornetet 812.482.8499
To err is human - to moo, bovine.
From: Oliver Marshall [mailto:[email protected]]
Sent: Thursday, July 28, 2011 8:23 AM
To: NT System Admin Issues
Subject: Batch file syntax question
Does anyone know what this does to this variable?
set Var1=%1#
set Var1=%Var1:"=%
set Var1=%Var1:\#=%
set Var1=%Var1:#=%
[cid:[email protected]]
Network Support
Online Backups
Server Management
[http://www.g2support.com/googleapps.jpg]
Tel: 0845 307 3443
Email: [email protected]
Web: http://www.g2support.com<http://www.g2support.com/>
Twitter: g2support<http://twitter.com/home?status=@g2support>
Newsletter: http://www.g2support.com/newsletter
Mail: 2 Roundhill Road, Brighton, Sussex, BN2 3RF
Have you said something nice about us to a friend or colleague ?
Let us say thanks. Find out more at
www.g2support.com/referral<http://www.g2support.com/referral>
G2 Support LLP is registered at Mill House, 103 Holmes Avenue, HOVE
BN3 7LE. Our registered company number is OC316341.
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin<<inline: image001.jpg>>
<<inline: image002.png>>
