 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
jroad
Joined: 06 Feb 2006 Posts: 26
|
Posted: Sun Feb 19, 2006 8:02 am Post subject: Best way to copy multiple large files at once? |
|
|
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 |
|
 |
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...
|
Posted: Sun Feb 19, 2006 9:19 am Post subject: Re: Best way to copy multiple large files at once? |
|
|
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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5068 Location: imaginationland
|
Posted: Sun Feb 19, 2006 11:45 am Post subject: |
|
|
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 |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Sun Feb 19, 2006 3:29 pm Post subject: Total Copy |
|
|
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 |
|
 |
jroad
Joined: 06 Feb 2006 Posts: 26
|
Posted: Mon Feb 20, 2006 9:31 am Post subject: |
|
|
| 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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|