Manipulate a string to use later


I was hoping for some guidance. I would like to create a script file that pull in a string - manipulates that string to be used by another file.

Example: Pull in the %computername% then change the string based on a pattern - every other character has say $ between them and the last letter is capital.

So if the computer name is myPCname - pull in that string - and change it to my$PC$na$mE and then save that result to a variable that can be access by another cmd file.

Any ideas are appreciated - thanks

0 Comments   [ + ] Show comments

Answers (2)

Posted by: anonymous_9363 3 years ago
Red Belt

Sometimes, people simply invite being sent LMGTFY links...

  • i am a believer is multiple fronts,so i ask the question while doing my own research - I have been pointed in a better direction that way.
    if you have some thoughts on sites for resources i welcome your input, otherwise you comments is as much a waste of time as you feel my question is. - jg1155 3 years ago
    • You could have got the answer to your question in an order of magnitude less time than it took to type it out.

      >if you have some thoughts on sites for resources
      Ummm...what would be the point, since you "have been pointed in a better direction"? - anonymous_9363 3 years ago
Posted by: chucksteel 3 years ago
Red Belt

Options off the top of my head:

  1. Set an environment variable
  2. Write the string to a file and read that file with the other script

  • Thanks you - i have actually been working on a a simualar solution - just last night - appricated you assistance. - jg1155 3 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ