Created
October 7, 2019 16:37
-
-
Save rossarioking/cf8e7b98cd4dbdf48211283c4a9bff4c to your computer and use it in GitHub Desktop.
Creating Basic Folders and Files with VBScript #VBScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim objFileSystemObject, objParentFolder, objChildFolder, objFile | |
'Create an instance of the file System Object | |
Set objFileSystemObject = CreateObject("Scripting.FileSystemObject") | |
'Create Monthly report folder (Parent Folder) | |
Set objParentFolder = objFileSystemObject.CreateFolder("C:\Monthly Reports") | |
'Create child folder | |
Set objChildFolder = objFileSystemObject.CreateFolder("C:\Monthly Reports\January\") | |
'Create Report text File | |
Set objFile = objFileSystemObject.CreateTextFile("C:\Monthly Reports\January\JanuaryReport.txt") | |
WScript.Quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment