Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Read Specific types of Files in a folder

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,50321
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Read Specific types of Files in a folder
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Read Specific types of Files in a folder - 8/2/2007 6:52:22 PM   
  peachtea

 

Posts: 41
Score: 0
Joined: 7/5/2007
From: Singapore
Status: offline
hi all


      

but i need to read specific type of file

have found something like "Set InputFile = objFSO.GetFolder("C:\Documents and Settings\Administrator\Desktop\Datascope\sample-data\*.o")

which is suppose to delete all files with extension "o" and ignore the rest

but i got the error msg "File not found" but there is file there.... pls help! Thanks
 
 
Post #: 1
 
 RE: Read Specific types of Files in a folder - 8/2/2007 8:38:56 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
use the GetExtensionName method of FSO


      

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to peachtea)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Read Specific types of Files in a folder Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts