Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: HTML status page with counter

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: HTML status page with counter
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 RE: HTML status page with counter - 12/15/2006 8:27:53 AM   
  esnmb

 

Posts: 441
Score: 0
Joined: 1/11/2005
From: USA
Status: offline
I'm sending it to you now along with the excel file layout we are using.

(in reply to TNO)
 
 
Post #: 21
 
 RE: HTML status page with counter - 12/15/2006 9:07:36 AM   
  TNO


Posts: 1056
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I'll have a look at it toworrow, I can't load yahoo today, the connection is too bad from out here in Iraq. (12k connection when I get lucky)

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to esnmb)
 
 
Post #: 22
 
 RE: HTML status page with counter - 12/16/2006 4:16:21 AM   
  TNO


Posts: 1056
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
hooray, Yahoo works today, and I have an answer for you my friend:

' Scans the users Citrix server Desktop and copies files depending on extensions.
Sub FileCopier(CitrixSrv)
err.Clear
If objFSO.FolderExists("\\" & CitrixSrv & "\c$\Documents and Settings\" & strUser) Then
 
 Set objCTXFolder = objFSO.**MOBILE CODE**("\\" & CitrixSrv & "\c$\Documents and Settings\" & strUser & "\Desktop")
 Set colCTXFiles = objCTXFolder.Files
 

Dim TotalCount
Dim Current
TotalCount=0
Current=0
 
For Each file In colCTXFiles
   TotalCount=TotalCount+1
Next

 For Each file In colCTXFiles
   Current=Current+1
  Select Case LCase(Right(file.Name, 4))
  
   Case ".lnk"
    Set objShortCut = objShell.CreateShortcut(file.Path)
    strPath = objShortCut.TargetPath
    strWorkingDir = objShortCut.WorkingDirectory
    
    If Not LCase(Right(strPath, 4)) = ".exe" Then
     objFSO.**MOBILE CODE** file.Path, "f:\users\" & strUser & "\My Shortcuts\" & file.Name
    **MOBILE CODE**
   
   Case ".doc", ".pdf", ".xls", ".ppt", ".mdb", ".xlw", ".xla", ".txt", ".zip"
    call CopyDocs(file.Path, file.Name)
   progress(Current,TotalCount)
  End Select
 Next

Alright, this is the idea:
Sub FileCopier is the one that does all the leg work it seems. Based on this we can determine how to update the progress bar. First off declare the current and totalcount variables outside the loop so we can track our progress. To figure out how many files there are total, create another loop to iterate though all the files to figure out how many we got. Next, when the main loop starts we update the current count by 1 so we know which file is current, now we obviously don;t want to update the progress bar unless real progress was made (when a file is actually copied). So in that Case block is where you send the info to the progress function to update the bar, and I think that will get what we want

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to TNO)
 
 
Post #: 23
 
 RE: HTML status page with counter - 12/18/2006 12:21:16 AM   
  esnmb

 

Posts: 441
Score: 0
Joined: 1/11/2005
From: USA
Status: offline
Ah.  very nice.  Let me put this in and let you know how it goes.

thanks again!

(in reply to TNO)
 
 
Post #: 24
 
 
Page:  <<   < prev  1 [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 >> RE: HTML status page with counter Page: <<   < prev  1 [2]
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