Use a variable in file path in .vbs

前端 未结 4 1966
醉话见心
醉话见心 2020-12-21 04:05

Is it possible to usa variable in a path in .vbs. My basic situation is I have a vbs script that will often be run on a computer with one person logged in and run by an admi

4条回答
  •  天命终不由人
    2020-12-21 04:36

    If I understand what you're after correctly, you're either going to need to do a string concatenation where you build a string like "string part 1" & logger & "string part 2" or use the replace function to replace %Logger% (e.g. Replace(templateString, "%Logger%", logger)) with your logger variable. There's not a direct equivalent to the %1 sort of format used in batch files.

提交回复
热议问题