AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Best way to copy multiple large files at once?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jroad



Joined: 06 Feb 2006
Posts: 26

PostPosted: Sun Feb 19, 2006 8:02 am    Post subject: Best way to copy multiple large files at once? Reply with quote

Hi,

In my post edit video processing script I'm writing, I would like to have a step where I can make a backup copy of several large video files. Is there a best way to do this such that minimizes CPU usage and disk operations?

Is there a better way than:
Code:
FileCopy, c:\video\*.mpg, c:\video\backup


By better, I mean that my pc is noticably slower to respond than if I manually copied the files one at a time in explorer. Do I need to setup a folder reading loop and FileCopy one file at a time to reduce the performance hit?
Back to top
View user's profile Send private message
JSLover



Joined: 20 Dec 2004
Posts: 542
Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...

PostPosted: Sun Feb 19, 2006 9:19 am    Post subject: Re: Best way to copy multiple large files at once? Reply with quote

I don't know if it's better, but it's different...

Code:
Run, cmd /c copy c:\video\*.mpg c:\video\backup ;, , hide

...(after it works you can remove the ; from in front of the ", , hide" to hide the copy window)...if you don't care how fast it happens, but just don't want it to freeze your comp...

Code:
Run, cmd /c copy c:\video\*.mpg c:\video\backup, , , copypid
Process, Priority, %copypid%, B ; or L

...this might work too (as far as not freezing the comp...it won't be "faster")...

Code:
Process, Priority, , B
FileCopy, c:\video\*.mpg, c:\video\backup
Process, Priority, , N

_________________

Home • Click image! • Blog
Back to top
View user's profile Send private message Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5068
Location: imaginationland

PostPosted: Sun Feb 19, 2006 11:45 am    Post subject: Reply with quote

This is a simpler AutoHotkey-only solution:
Code:
Loop, c:\video\*.mpg
   FileCopy, %A_LoopFileLongPath%, c:\video\backup


If you want to speed up your script, put 'SetBatchLines, -1' right at the top of your script.
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Sun Feb 19, 2006 3:29 pm    Post subject: Total Copy Reply with quote

You may be interested by Total Copy. I used it in the past to make large backups across the network without swamping it.
It allows to make "slow" copies, ie. transfering less bytes per second that standard copy. It probably use less CPU as well.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
jroad



Joined: 06 Feb 2006
Posts: 26

PostPosted: Mon Feb 20, 2006 9:31 am    Post subject: Reply with quote

Thanks for the suggestions. I will try out the loop with the FileCopy within it. Phil.ho: thanks for the recommendation but I was looking for a way within AHK to do the copying.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group