GetDirList??
Moderators: JRL, Dorian (MJT support)
GetDirList??
GetDirList would be such a "natural" for MSched, I actually thought it was a current command. I have written a few lines to use CMD to write the results of a dir *. to a file, but is there a more 'elegant' way to do this?
GetDirList>c:\SomeFolder,MyList
Sep>MyList,;,DIR
yadda yadda.....is what I am looking for, but is there anything for now better than using CMD and some DOS commands?
GetDirList>c:\SomeFolder,MyList
Sep>MyList,;,DIR
yadda yadda.....is what I am looking for, but is there anything for now better than using CMD and some DOS commands?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Does GetFileList not do the job:
GetFileList>c:\somedir\*.*,list
What would GetDirList do that is different?
GetFileList>c:\somedir\*.*,list
What would GetDirList do that is different?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Right, sorry, I didn't understand what you wanted it to achieve. I do now.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi SkunkWorks,
I agree, GetDirList does seem like a natural for Macro Scheduler, great idea. In the meantime, you mentioned some VB code was posted that will do this. I found the following helpful post...
How to build a directory list
http://www.mjtnet.com/usergroup/viewtopic.php?t=2310
Was that the post you were talking about?
Thanks
P.S. Marcus, has GetDirList made it onto the official wishlist or should something be posted about this on the Enhancement Suggestion forum?
I agree, GetDirList does seem like a natural for Macro Scheduler, great idea. In the meantime, you mentioned some VB code was posted that will do this. I found the following helpful post...
How to build a directory list
http://www.mjtnet.com/usergroup/viewtopic.php?t=2310
Was that the post you were talking about?
Thanks
P.S. Marcus, has GetDirList made it onto the official wishlist or should something be posted about this on the Enhancement Suggestion forum?
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It's on the list.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
jpuziano,
I couldn't find the same post, so, at the risk of duplicating a post....here it the code to find all folders within a folder.
/VB example for recursive dir listing and files contained in the directories.
//set your path here ...
Let>path=C:\MainMenu\
VBSTART
Function GetFolderList(folderspec)
Dim fso, f, f1, fc, s, sf
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.SubFolders
For Each f1 in fc
s = s & f1.name & ";"
sf = GetFolderList(folderspec & "\" & f1.name)
if sf "" then
s = s & f1.name & "\" & sf & ";"
end if
Next
If s "" then
s = Mid(s,1,Len(s)-1)
End If
GetFolderList = s
End Function
VBEND
//list files in path
GetFileList>%path%*.*,filelist
Separate>filelist,;,files
If>files_count>0
Let>f-cntr=0
Repeat>f-cntr
Let>f-cntr=f-cntr+1
MessageModal>files_%f-cntr%
Until>f-cntr,files_count
Endif
//Enumerate files in all subfolders in path
VBEVAL>GetFolderList("%path%"),folderList
Separate>folderList,;,folders
Let>d-cntr=0
Repeat>d-cntr
Let>d-cntr=d-cntr+1
Let>subfolder=folders_%d-cntr%
Let>subfolderpath=%path%%subfolder%
MessageModal>Now for files in %subfolderpath%
GetFileList>%subfolderpath%\*.*,filelist
Separate>filelist,;,files
If>files_count>0
Let>i=0
Repeat>i
Let>i=i+1
Let>thefile=files_%i%
MessageModal>thefile
Until>i,files_count
Endif
Until>d-cntr,folders_count
...I changed the path name and the names of the counters in the Repeat command, other than that it is the same as the original post.....
I couldn't find the same post, so, at the risk of duplicating a post....here it the code to find all folders within a folder.
/VB example for recursive dir listing and files contained in the directories.
//set your path here ...
Let>path=C:\MainMenu\
VBSTART
Function GetFolderList(folderspec)
Dim fso, f, f1, fc, s, sf
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.SubFolders
For Each f1 in fc
s = s & f1.name & ";"
sf = GetFolderList(folderspec & "\" & f1.name)
if sf "" then
s = s & f1.name & "\" & sf & ";"
end if
Next
If s "" then
s = Mid(s,1,Len(s)-1)
End If
GetFolderList = s
End Function
VBEND
//list files in path
GetFileList>%path%*.*,filelist
Separate>filelist,;,files
If>files_count>0
Let>f-cntr=0
Repeat>f-cntr
Let>f-cntr=f-cntr+1
MessageModal>files_%f-cntr%
Until>f-cntr,files_count
Endif
//Enumerate files in all subfolders in path
VBEVAL>GetFolderList("%path%"),folderList
Separate>folderList,;,folders
Let>d-cntr=0
Repeat>d-cntr
Let>d-cntr=d-cntr+1
Let>subfolder=folders_%d-cntr%
Let>subfolderpath=%path%%subfolder%
MessageModal>Now for files in %subfolderpath%
GetFileList>%subfolderpath%\*.*,filelist
Separate>filelist,;,files
If>files_count>0
Let>i=0
Repeat>i
Let>i=i+1
Let>thefile=files_%i%
MessageModal>thefile
Until>i,files_count
Endif
Until>d-cntr,folders_count
...I changed the path name and the names of the counters in the Repeat command, other than that it is the same as the original post.....
Thanks SkunkWorks 

jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
