File Mover Blog

July 7, 2020

Q&A 19: Backup 2 Files but Only Copy 1 to Destination

Q: Backup 2 Files but Only Copy 1 to Destination.

I need to set up a job that

  1. moves 2 files of different extensions off of a source
  2. Backup both files
  3. Only send 1 file to the destination.

The 2 files from the source will be like ‘Filename.rec’ and ‘Filename.snd’. I want both backed up, but only want ‘Filename.snd’ to be sent to the destination. Is that possible?

A: Yes that is possible using some Pascal Script.

First you need to add a filename include filter to only filter the files you want (*.snd and *.rec files):

LimagitoX File Mover Include Filename Filter

Add two destinations. Really important:

  1. First destination (ID1) must be your Backup destination
  2. Second destination (ID2) must the output destination.

LimagitoX File Mover Destinations

Add the following ‘On Destinations‘ Pascal Script:
LimagitoX File Mover Pascal Script Menu Item
Begin
  psExitCode:= 1;
  // ... add your code here
  If SameText(psDestinationID, 'ID2') then
    If Not SameText(ExtractFileExt(psFilename), '.snd') then
      psExitCode := -1;
End.
LimagitoX File Mover On Destinations Pascal Script
If you need any help , please let us know.
Regards,
Limagito Team
By Limagito-Team Q&A Share:
SEARCH