Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


FSO.CopyFile vs Drag and Drop Copy

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> FSO.CopyFile vs Drag and Drop Copy
  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 >>
 FSO.CopyFile vs Drag and Drop Copy - 10/20/2008 1:49:43 AM   
  nrlewis

 

Posts: 29
Score: 0
Joined: 10/16/2008
Status: offline
I'm working on a backup script, and I noticed what appears to be an anomaly. When I run the script it takes much longer to copy the files, compaired to simiply dragging and dropping the folder from one location to another (FSO.CopyFile takes two minutes and "d:\copy setup g:\setup\" takes 10 seconds). Any ideas as to why this is happening, and a possible fix? Thanks in advance for the assistance.



      
 
 
Post #: 1
 
 RE: FSO.CopyFile vs Drag and Drop Copy - 10/20/2008 1:59:51 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
Well for one thing you have a lot of interaction tat the straight copy would not have to deal with.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to nrlewis)
 
 
Post #: 2
 
 RE: FSO.CopyFile vs Drag and Drop Copy - 10/20/2008 3:03:07 AM   
  nrlewis

 

Posts: 29
Score: 0
Joined: 10/16/2008
Status: offline
quote:

ORIGINAL: ebgreen

Well for one thing you have a lot of interaction tat the straight copy would not have to deal with.


Well, what about when you drag and drop? Isn't the OS running through a similar process? For each file it copies, it kinda' estimates how long it will take to copy the files, and then displays that representation as a progress bar? It seems to go through that process reather quickly...what's the difference?

What I'd like to do is display what percent has been copied, and maybe the name of the file being copied. I don't want it to take 12X longer then it normally would. Any thoughts? javascript:void(opener.AddText('[sm\=blush.gif]'));self.focus();

NRLEiWS

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: FSO.CopyFile vs Drag and Drop Copy - 10/20/2008 3:05:41 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
The difference is that you are explicitly telling the system to stop everything it is doing and display a message to the user for 2 seconds. And you have it do this for every file that it copies. Instead, search this forum for examples of Progress Bars. There are a lot of them out there.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to nrlewis)
 
 
Post #: 4
 
 RE: FSO.CopyFile vs Drag and Drop Copy - 10/20/2008 5:22:34 AM   
  Fredledingue


Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
You may be interrested in this:

http://visualbasicscript.com/m_64302/mpage_1/key_/tm.htm#19

Look at the stript on my last reply on this page... post #19

< Message edited by Fredledingue -- 10/20/2008 5:24:24 AM >


_____________________________

Fred

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: FSO.CopyFile vs Drag and Drop Copy - 10/20/2008 8:43:22 AM   
  nrlewis

 

Posts: 29
Score: 0
Joined: 10/16/2008
Status: offline
quote:

ORIGINAL: Fredledingue

You may be interrested in this:

http://visualbasicscript.com/m_64302/mpage_1/key_/tm.htm#19

Look at the stript on my last reply on this page... post #19



Thank you both for your input! I'd actually been looking through the forums all weekend, which kinda' left me absent minded.
After reviewing your post Fred, and searching the forums again EB, I found this link

Here

Particularly this piece of code:

      

I was able to find details on the technique: Here

For now, this will do just fine. I don't know if I've mention it or not, but I've been doing this for all of two weeks and I think your example Fred was a little over my head. I got the idea, but I'm brain dead right now...I'm sure I'll be using the technique in the near future...but for now I'ma let me brain reconstitute (mush doesn't hold info very well)

Anyway, here is the final code set, just-in-case anyone was wondering. Thanks again for the help m8!


      

(in reply to Fredledingue)
 
 
Post #: 6
 
 
 
  

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 >> FSO.CopyFile vs Drag and Drop Copy 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