VB Script/how to manipulate the folder
Expert: Miguel Zapico - 10/11/2006
Questionhi sir, i would like to know the code in visual basic how to put a folder in a picture box, to rename, delete this folder.
Thanks,
Honicko
AnswerI am not completely sure that I have understood what you need. In any case, this extract from the Windows Script Technologies may help you:
Folder Object
Provides access to all the properties of a folder.
Remarks
The following code illustrates how to obtain a Folder object and how to return one of its properties:
[JScript]
function ShowFolderInfo(folderspec)
{
var fso, folder, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
folder = fso.GetFolder(folderspec);
s = folder.DateCreated;
return(s);
}
[VBScript]
Function ShowDateCreated(folderspec)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
ShowDateCreated = f.DateCreated
End Function
Methods
Copy Method | Delete Method | Move Method | OpenAsTextStream Method
Properties
Attributes Property | DateCreated Property | DateLastAccessed Property | DateLastModified Property | Drive Property | Files Property | IsRootFolder Property | Name Property | ParentFolder Property | Path Property | ShortName Property | ShortPath Property | Size Property | SubFolders Property | Type Property