5. März 2014 16:15
5. März 2014 20:13
6. März 2014 08:43
IF ISCLEAR(ScriptControlL) THEN
CREATE(ScriptControlL);
WSHFolderL := FileSystemObjectL.GetFolder(DirectoryP);
WSHFilesL := WSHFolderL.Files;
ScriptControlL.Language := 'VBScript';
ScriptControlL.AddObject('FilesByName',WSHFilesL);
ScriptControlL.AddObject('FilesById',FilesDictL);
TxtCRL := '';
TxtCRL[1] := 13;
TxtCodeL :=
'dim f1' + TxtCRL +
' For Each f1 in FilesByName' + TxtCRL +
' FilesById.Add (FilesById.Count+1), f1' + TxtCRL +
' Next' + TxtCRL;
ScriptControlL.AddCode(TxtCodeL);
TxtCodeL :=
'function GetItem(i)' + TxtCRL +
' GetItem = FilesById(i)' + TxtCRL +
'end function' + TxtCRL;
ScriptControlL.AddCode(TxtCodeL);
ScriptControlL.ExecuteStatement(TxtCodeL);
FileTableTempL.DELETEALL();
7. März 2014 08:47