AutoHotkey Community

It is currently May 27th, 2012, 9:09 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: February 19th, 2006, 8:02 am 
Offline

Joined: February 6th, 2006, 3:12 am
Posts: 26
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?


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 19th, 2006, 9:19 am 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 798
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
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

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 19th, 2006, 11:45 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
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.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Total Copy
PostPosted: February 19th, 2006, 3:29 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2006, 9:31 am 
Offline

Joined: February 6th, 2006, 3:12 am
Posts: 26
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google [Bot], Yahoo [Bot] and 69 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group