VBScript that will run through several folder trees and run this script on each folder in the tree
Posted on 2006-06-08
I am having a difficult time creating a script that will run through various folder trees and run the following script on every document with in the folder.
'Set Type of Files To Act Upon
DocumentType="Microsoft PowerPoint Presentation"
'Generate Objects for Filesystem, Folder, and Files within the current folder
Set FileSysObj = CreateObject("Scripting.FileSystemObject")
Set FileSysFolder = FileSysObj.GetFolder(FileSysObj.GetAbsolutePathName("folder path"))
Set FileSysFiles = FileSysFolder.Files
Set PowerPoint = CreateObject("PowerPoint.Application")
PowerPoint.Visible = False
'Loop through each File In the Folder
For Each ObjFile in FileSysFiles
If (objFile.Type = DocumentType) Then
Pres_Name = FileSysFolder & "\" & objFile.Name
PowerPoint.Presentations(Pres_Name).BuiltInDocumentProperties("Title").Value = PowerPoint.Presentations(Pres_Name).Name
These folders are for archived documents, so they go from year, month, and day. I have no idea how to create a script that will perform the script on every folder.