PDA

View Full Version : Copyto Folder Path


blaz
12-Jan-2009, 07:43 PM
I am trying to do a copyto from one folder to another. This works but does not copy the folder structure. How do I copy the folder structure with the files?

select rt.diff.files rt.orphan.files
copyto "C:\Patcher\Zips\"
sync mirror:left->right

Aaron
13-Jan-2009, 02:34 PM
Hello Blaz,

We have more detailed documentation available in our Help File (Help Menu -> Contents; or F1), under the Scripting Reference article, or Using Beyond Compare -> Automating with Scripts section. The "Copy To Folder" topic contains some sample pictures and descriptions of none, base, and relative.

Here's the text detailing COPYTO, and the "path:" parameter

COPYTO
Usage:
copyto [lt|rt|all] [path:(relative|base|none)] <path>

Copies the selected files/folders on the specified side to the specified path using the path option. base keeps the entire folder structure relative to the base folders of all selected items. relative keeps the minimum relative folder structure of all selected items.

The defaults are all and path:none.

gbenson
13-Jan-2010, 02:07 PM
I am also trying to use copyto and running into what might be the same thing (I think) that blaz encountered. The problem is it works just fine so long as there are root level differences. It does not work if there are only sub-folder differences.

If the root folder contents (files) are identical, but the files in the subfolders are different it simply does nothing, it will not create the sub-folder and copy the different files. If I go in and manually alter one of the root level files, copyto works fine and copies both the root level file I modified as well as all the different sub-folder files.

My script:

load "Seemage-Ref Oneil Test PDX"
log 3Dvia-ONeilcopy.log
option confirm:yes-to-all
select lt.newer lt.orphan lt.diff
copyto lt path:base "F:\eTRAGE\oneil\"

BC3 ver 3.1.9 build 11282

Chris
13-Jan-2010, 02:55 PM
Hi gbenson,

Try this modified version of your script:
load "Seemage-Ref Oneil Test PDX"
log 3Dvia-ONeilcopy.log
option confirm:yes-to-all
expand all
select lt.newer.files lt.orphan.files lt.diff.files
copyto lt path:base "F:\eTRAGE\oneil\"

gbenson
13-Jan-2010, 03:39 PM
Worked like a charm. Many thanks.