Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Pygowsky

Member
  • Content Count

    6
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Pygowsky

Profile Information

  • OS
    Windows 7 x64
  1. Yea, I'm actually in a class where we did batch files followed by vbscript which we just finished and moving to powershell this week.
  2. Thanks for the input, next time I will take that all into consideration. I try to do scripts without option explicit first and then go back and add it in if I do end up having any typos or the script isn't working. But I am very new to vbscript, never knew it existed until January, so again I appreciate the help and critique, thanks again
  3. @gunsmokingman thanks for the awesome help man, I got it to work and pull the proper contents. The only differernce was that I changed the numberPattern from the one you had to this "^([0-9]?[0-9](\.[0-9][0-9]?)?)|([0-9]?[0-9]?(\.[0-9][0-9]?))$"
  4. That works to take those lines out, except how would I used regex to parse ScriptingSamples2.txt into multiple script files. Like in the text document I uploaded, each numbered section needs to be in it's own separate script file. 2. A script to fetch disk space on drive C: Option Explicit Const CONST_GB = 1073741824 Dim strComputer, objWMIService, objLogicalDisk, intFreeGB strComputer = "." Set objWMIService = GetObject("winmgmts://" & strComputer) Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='C:'") intFreeGB = objLogicalDisk.FreeSpace / CONST_GB Wscript.Echo "There are " & Round(intFreeGB,2) & " gigabytes of free disk space." I would like that part in a script titles Script_2.vbs. So the script would not only parse the entire text document, but split each section into their own number corresponding vbs file as well. Put ScriptingSamples2.txt in the same folder as this parse.txt, switch the parse.txt to parse.vbs and run it and see what happens. I need a script that does that except using regex parse.txt
×
×
  • Create New...