Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


!!!! URGET Help !!!! ########

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> !!!! URGET Help !!!! ########
  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 >>
 !!!! URGET Help !!!! ######## - 5/29/2008 6:55:44 PM   
  sanagapalli

 

Posts: 1
Score: 0
Joined: 5/23/2008
Status: offline
Helo all, I am working on a critical task tonight for that I need some one help here.

I need to modify a text file.  I need to replace a string with another string.  I have 215 files are there and they are different directories.  some one can help me out how to replace the string within a file using vbscripting.  I couldn't able to find a method in VBS.

Also I need to traverse around different directories to search for the file name.  The file name is same but the same file will be there in different folders in the drive.


Greatly appreciate the reply


Thank You,
 
 
Post #: 1
 
 RE: !!!! URGET Help !!!! ######## - 5/30/2008 1:51:51 AM   
  chris_cs

 

Posts: 93
Score: 0
Joined: 10/9/2006
Status: offline
For traversing different files look up the FileSystemObject. For replacing the string look up RegExp (to find a string) or the Replace method.

You can also use the FileSystemObject for opening and writing to the file.

(in reply to sanagapalli)
 
 
Post #: 2
 
 RE: !!!! URGET Help !!!! ######## - 5/31/2008 10:15:57 PM   
  Fredledingue


Posts: 337
Score: 0
Joined: 5/9/2005
From:
Status: offline
Here is the code to search through subdirectories


      

HTH

_____________________________

Fred

(in reply to chris_cs)
 
 
Post #: 3
 
 
 
  

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 >> !!!! URGET Help !!!! ######## 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