Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Moving/Copying problem?

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Moving/Copying problem?
  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 >>
 Moving/Copying problem? - 7/22/2008 1:40:33 AM   
  williamstome

 

Posts: 1
Score: 0
Joined: 7/22/2008
Status: offline
I'm having a little trouble with my script here...
I had it working at one point, but in trying to tweak it to go further, I messed something up and can't figure out what.
It's only having problems with the firefox section, which starts at the second do loop

Outline of FF section:
Read through each profile in list
see if the user/profile combination exists, and holds a history.dat file
if so, run Dork on it. This creates a history.txt file in the same directory as history.dat
copy history.txt to the Q:\Output folder
move (ie rename) it to have a more specific file name

Code:
Set shell = Wscript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CreateTextFile("Q:\Output\iehistory.txt")
objFSO.CreateTextFile("Q:\Output\profilelist.tmp")
objFSO.CreateTextFile("Q:\Output\userlist.tmp")
shell.Run "cmd /c dir ""C:\Documents and Settings\""/AH /B > Q:\Output\userlist.tmp"
shell.Run "cmd /c dir ""C:\Documents and Settings\""/A-H /B >> Q:\Output\userlist.tmp"
Set objFile = objFSO.OpenTextFile("Q:\Output\userlist.tmp", 1)
Do Until objFile.AtEndOfStream
   strLine = objFile.Readline
   shell.Run "cmd /c Q:\LiveTools\iehist.exe ""C:\Documents and Settings\"&strLine&"\Local Settings\History\History.IE5\index.dat"" /ASH >> Q:\Output\iehistory.txt"
   shell.Run "cmd /c dir ""C:\Documents and Settings\"&strLine&"\Application Data\Mozilla\Firefox\Profiles\"" /B >> Q:\Output\profilelist.tmp"
   Set objFile2 = objFSO.OpenTextFile("Q:\Output\profilelist.tmp", 1)
   Do Until objFile2.AtEndOfStream
       strLine2 = objFile2.Readline
       hpath="C:\Documents and Settings\"&strLine&"\Application Data\Mozilla\Firefox\Profiles\"&strLine2&"\history.dat"
       if objFSO.FileExists(hpath) Then
           shell.Run "cmd /k Q:\LiveTools\Dork.exe ""C:\Documents and Settings\"&strLine&"\Application Data\Mozilla\Firefox\Profiles\"&strLine2&"\history.dat"""
           incopy="C:\Documents and Settings\"&strLine&"\Application Data\Mozilla\Firefox\Profiles\"&strLine2&"\history.txt"
           outcopy = "Q:\Output\"
           objFSO.CopyFile incopy,outcopy
           inmove = "Q:\Output\history.txt"
           objFSO.CreateTextFile("Q:\Output\ffhistory_"&strLine&"_"&strLine2&".txt")
           outmove = """Q:\Output\ffhistory_"&strLine&"_"&strLine2&".txt"""
           objFSO.MoveFile inmove, outmove
       End If
   Loop
Loop
set shell = Nothing


Anyone? :\
 
 
Post #: 1
 
 
 
  

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 >> Moving/Copying problem? 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