Showing results for 
Search instead for 
Did you mean: 

Calling Script from Script Database using General File Path

I have a script that I use to call other scrips and we changed the file paths to these scrips that I call. Right now my code uses absolute file paths to call the scripts. E.g.: z:\User\ID\Scripts\SubFolder\SubFolder2\script.vbs.


Is there a way to provide a general location, e.g.: z:\User\ID\Scripts, and then the script name and it would search that location and all sub folders for the script?


We have all the sub folders to provide structure for a favorites menu, otherwise I would dump all the scripts into a single folder.

0 Kudos
Message 1 of 4

Are you using the DataFinder to call these scripts? If so, you should be able to modify the search areas to include subfolders

0 Kudos
Message 2 of 4

How do I configure the data finder to show scripts or do I not need to do that? I did not find a data plugin to support the vbs files.

0 Kudos
Message 3 of 4

Hi Brian,


For what I have done, I like to use a INI file for storage of base paths, and have VBS class that will allow this very easily.  Let me know if you would like a post of it, and I will send it.  

Also  have  used Registry in Windows to hold paths on occasion, this also could be written and read from VBS easily. Stack Overflow will have some good examples of this.


As far as reading the files through all the sub directories. 

I like using the createobject("Scripting.filesystemobject")  group of commands. (gives me more flexiblity that the DIAdem functions) Once you have a fso object then can get a directory, and then all the files and directories that are under that path.   Please respond with clarification as to what option of these are interesting to you, and I can provide some sample code.



0 Kudos
Message 4 of 4