|
|||
|
In your help files I stumbled upon this code to get a file list
//Initialize //The following example illustrates how to get a Files collection and iterate the collection //using the Enumerator object and the for statement: function ShowFolderFileList(folderspec) { var fso, f, f1, fc, s; fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.GetFolder(folderspec); fc = new Enumerator(f.Files); s = ""; for (; !fc.atEnd(); fc.moveNext()) { s += fc.Item(); s += "<br>"; } return(s); } var fso = new ActiveXObject("Scripting.FileSystemObject"); var a = fso.CreateTextFile("c:\\testfile.html", true); a.writeLn(ShowFolderFileList("c:\\")); a.Close; return true; But when I run the example I get this error Warning: unknown method "Item" Warning: unknown method "Item" Warning: unknown method "Item" Warning: unknown method "Item" Warning: unknown method "Item" Warning: unknown method "writeLn" What is wrong?? |
|
|||
|
Hi meester, sorry for the late response.
FFish Script is a case sensitive language. You should spell "fc.item()" instead of "fc.Item()" "writeln" is not a method of "TextStream" object, it should be "writeline". |
|
|||
|
two questions
-I still don't seem to get a list of all the files in the directory. All I get is a testfile like [activeX Object] [activeX Object] [activeX Object] [activeX Object] [activeX Object] ... - Is there a way to call a function in flash through Ffisch? |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|