General information
Category:
Coding, syntax & commands
>>I was doing a little coding in VB on the weekend, trying to simulate ADIR and other functions when I came across the File System Object.
>>
>>This object model of the file system, which also has methods to move and delete and rename files etc. is very elegant and works well in VFP.
>>
>>Here is a minor sample of what I mean. Change the path in GetFolder to one that exists on your own system.
>>
>>hide windows all
>>clear
>>
>>fso = CreateObject("Scripting.FileSystemObject")
>>fldr = fso.GetFolder("e:\vfp")
>>? "path is: " + fldr.path
>>? "Folder name is: " + fldr.name
>>
>>for each mfile in fldr.files
>> ? "File name is : " + PADR(mfile.name, 40) + " " + str(mfile.size)
>>endfor
>>
>>?
>>? "Folders found in this directory:"
>>For Each mfolder in fldr.subfolders
>> ? mfolder.name
>>endfor
>
>
>
>I fail to do this code:
>fso = CreateObject("Scripting.FileSystemObject")
>
>What should I install to make it works!?
>
>e.g. if install MS Office can make: CreateObject("Word.Basic")
It requires the DLL SCRRUN.DLL. I'm not sure what loaded it, Visual Studio, VB 6.0. IIS. It is part of the scripting engine that I suppose may come with the internet tools, maybe even FrontPage!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only