Seite 1 von 1

opsi-winst / opsi-script: Getting elements of directory into stringList?

Verfasst: 28 Nov 2017, 15:39
von mirkt
Hello,

Is there an elegant way of getting list of elements in directory into stringList? The method I am using now (which I do not really like):

Code: Alles auswählen

DefVar $GoogleChromeExtensionsDir$
DefStringList $InstalledExtensions$

Set $GoogleChromeExtensionsDir$ = "%CurrentProfileDir%\AppData\Local\Google\Chrome\User Data\Default\Extensions"

if FileExists($GoogleChromeExtensionsDir$)
  Set $InstalledExtensions$ = shellCall('dir /B "' + $GoogleChromeExtensionsDir$ + '"')
endif