PDA

View Full Version : *.txt files compare lokal <-> ftp. I don`t get it


SEMA
02-Jul-2009, 07:53 AM
Hi,
I need to compare a local folder with a folder on a ftp server.
I would like BC to do this automatically with a script and the taskmanager.
In the local folder there is a single *.txt file which should be copied to the ftp folder.
In the ftp folder there are two *.txt files which should be copied to the local folder.
Any suggestions for the script?
:confused:

Thanks alot

Aaron
02-Jul-2009, 04:03 PM
Hello SEMA,

Are there 3 file pairs?
A > ftpA
B < ftpB
C < ftpC

Scripting actions mirror the same actions that you can take with the graphical interface. I recommend performing your sync using the Folder Compare, Actions menu -> Synchronize commands to attempt your sync in the graphical interface. This will help determine the steps you need to then write as script. If these do not meet your needs, you can use a combination of display filters, expand all, and selection commands.

Once script is written (Reference under the Help menu -> Help file: Scripting Reference, or under Using Beyond Compare: Automating with Script). The command line call is bcompare.exe @scriptfile.txt, which can be set as a Windows Scheduled Task.

A screenshot of the open Folder Compare may also help. You can post it here or email it to support@scootersoftware.com . Please include a link to this forum post if you email.

SEMA
22-Jul-2009, 03:48 AM
Sorry for the delay ... had some holidays.
We have one local folder and one ftp folder. In each folder are several *.txt-files.
We need to copy one specific txt file from the local folder to the ftp folder if this file is newer than on ftp side.
From the ftp folder we need to copy two specific files to the local folder if these files or one of these files are newer than on local side.
I have no idea how to select one special file to check the date and to copy it to the ftp folder if it is newer. Beyond Compare copies always all newer files ...
:-(

Thx alot

Aaron
22-Jul-2009, 02:52 PM
Hello,

I would recommend 2 Sessions, each with a different File Filter set, one showing just the one file, the other showing the other pair. (Or, setup 2 specific Filters under Tools -> Options, Folder Views: Filter Presets).

Then once the display is only showing the specific files for a directional compare, Copy or Sync:Update in the correct direction.

If you show all three files, and apply a Sync Update, it will work on all 3 files (so if one is newer it will replace the other side if Sync Update:Both is performed). Alternatively, you can select specific files, and perform a sync acting on only the selection.