AllExperts > Experts 
Search      

VB Script

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB Script Answers
Question Library

Ask a question about VB Script
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Miguel Zapico
Expertise
I can answer question about how to use scripts to consolidate data, connect different systems and automate tasks. I have no experience on using VBScript on web programming.

Experience
I have been using VBScript and Windows Scripting Host as my swiss tool for the last 6 years.

Organizations
New York PC users group (NYPC)
Independant Computer Consultants Association (ICCA)

Education/Credentials
Microsoft MCSE in Windows NT

 
   

You are here:  Experts > Computing/Technology > Basic > VB Script > how to manipulate the folder

Topic: VB Script



Expert: Miguel Zapico
Date: 10/11/2006
Subject: how to manipulate the folder

Question
hi 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  

Answer
I 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  

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.