02/05/2019 203 views


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


All Answers


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

Answered 02/06/2019 by: VBScab
Red Belt

  • 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.
    • 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"?

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

Answered 02/06/2019 by: chucksteel
Red Belt

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