View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019093 | MMW 5 | Extensions framework | public | 2022-05-21 07:14 | 2022-08-31 00:03 |
Reporter | zvezdan | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 5.0 | ||||
Target Version | 5.0.4 | Fixed in Version | 5.0.4 | ||
Summary | 0019093: Method to get the list of files in a folder needed | ||||
Description | I looked everywhere in your scripts and cannot find it. You know, something like: Set oFileObj = CreateObject("Scripting.FileSystemObject") oFileObj.GetFolder("c:\Temp\").Files | ||||
Tags | No tags attached. | ||||
Fixed in build | 2650 | ||||
|
There is https://www.mediamonkey.com/docs/api/classes/SharedFolder.html#method_getTracklist i.e. var folder = app.filesystem.getFolderFromString('C:\\Temp'); var tracklist = folder.getTracklist(); await tracklist.whenLoaded(); but you probably mean list of all files (not only media files) in a string list, right? OK, then introducing folder.getFileList would be valuable addition here. |
|
Yes, I want a list of any files, not only media files. A string list will be fine, but I would prefer if you implement the File object as it exists in the MS' FileSystemObject. Then we could use it to get the file properties directly without using getFileInfoAsync and similar. |
|
Here is link: https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/file-object |
|
Added in 5.0.4.2650 Can be used like this: var list = folder.getFileList( true {recursive}); await list.whenLoaded(); With the recursive param set to true it lists files contained within subfolders too. It returns string list (full paths), getFileInfoAsync can be used then on individual items. |
|
Verified 2661 Tested using 0019093:0068262 sample code |