Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Batch File Extract Part Of Variable Based On Previously Set Variable.

  • Please log in to reply
No replies to this topic

#1 PropagandaPanda


  • Malware Response Team
  • 10,433 posts
  • Gender:Male
  • Local time:04:39 AM

Posted 06 June 2008 - 06:04 PM


The topic title is kinda confusing so I'll explain further. I want to extract part of a variable using the
set variable1=%variable2:X:X%
I'm trying to replace the "X" with a variable already set. I want the effect of:
set number1=5
set number2=3
set variable1=%variable2:~%number%,%number2%%

Any input is appreciated.

With Regards,
The Panda

BC AdBot (Login to Remove)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users