Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2014
    Location
    Hampshire, England
    Posts
    2

    Default Is there a way to delete or move just the files in a 'select left.exact' subset?

    I get new photos, etc., and put them in the 'left' folder. When I run my Family Historian and import through that program, it copies the photos to the 'right' folder. I need to determine which photos I have processed from the 'left' folder and remove them from the left folder, leaving the one's still to be processed.

    I am using BC ver 4 on a Windows 7 pc.

    I have a script that 'nearly does what I want.:
    load "C:\FamilyTree\Photographs\New_pics_for_1820Settle rsWebsite\Media\buildings" &
    "C:\Users\Paul\Documents\Family Historian Projects\master\master.fh_data\Media\buildings"
    expand all
    select left.exact files
    folder-report layout:summary &
    options:display-matches &
    output-to:clipboard
    move left->right.

    ~~~
    The resultant clipboard file is:
    Produced: 13/11/2014 13:06:17

    Mode: Same
    Left base folder: C:\FamilyTree\Photographs\New_pics_for_1820Settler sWebsite\Media\buildings
    Right base folder: C:\Users\Paul\Documents\Family Historian Projects\master\master.fh_data\Media\buildings

    Same Files (19) Size Modified
    -----------------------------------------------------------------------
    Craigie_Burn_1.jpg 193,221 31/08/2014 10:56:03
    Craigie_Burn_2.jpg 213,176 31/08/2014 10:59:49
    Craigie_Burn_aerial.jpg 209,214 31/08/2014 11:34:49
    Geln_Avon_Mill.jpg 218,809 16/09/2014 15:05:05
    Glen_Avon_aerial.jpg 231,367 03/09/2014 14:47:22
    Glen_Avon_House_1.jpg 231,382 31/08/2014 10:40:15
    Glen_Avon_House_2.jpg 280,934 31/08/2014 10:41:27
    Glen_Avon_House_3.jpg 236,562 31/08/2014 10:42:08
    Glen_Craig_1.jpg 216,036 31/08/2014 10:46:35
    Glen_Craig_2.jpg 202,792 31/08/2014 10:47:56
    Glen_Craig_3.jpg 245,512 31/08/2014 10:49:45
    Glen_Craig_aerial.jpg 196,850 31/08/2014 11:30:17
    Mitford_Castle_Ruins.jpg 94,600 26/11/2013 18:17:54
    Mitford_Hall_built 1828.jpg 45,826 19/09/2014 12:08:54
    MitfordChurch.jpg 69,620 26/11/2013 18:18:42
    Tarr_homestead_a.jpg 122,585 28/09/2014 09:03:57
    Tarr_homestead_b.jpg 119,188 28/09/2014 09:04:24
    Tarr_stone.jpg 110,290 28/09/2014 09:16:45
    Tharfield with Bertram's house on left..jpg 138,862 17/09/2014 09:34:45
    -----------------------------------------------------------------------
    which is the correct list of all the photos processed.

    The delete left command deletes ALL the left files, and the move left->right moves ALL the left files.

    How can I just delete, or move ONLY the 19 files in the folder report subset, and not ALL the files in the left folder?
    Once I get it right on this small folder of 40+ files, I should be able to tackle the folders with 1000+ files. I do not really want to do this manually, but script it so it cleans up weekly on a schedule, leaving the files I still have to import into Family Historian.

    Any help will be appreciated. Many Thanks
    PaulTT

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    It looks like you just need to correct the select command in your script, it should be:
    select left.exact.files

    Let us know if this doesn't give you the behavior you're looking for.
    Chris K Scooter Software

  3. #3
    Join Date
    Nov 2014
    Location
    Hampshire, England
    Posts
    2

    Thumbs up

    Quote Originally Posted by Chris View Post
    It looks like you just need to correct the select command in your script, it should be:
    select left.exact.files

    Let us know if this doesn't give you the behavior you're looking for.
    Brilliant Chris, many thanks! What used to take me about 2 hours every 2 weeks, has just taken 14.8 seconds! Now to expand the script to cover other backup and compares.... Covered the cost of the package already!

  4. #4
    Join Date
    Jul 2016
    Posts
    1

    Default

    I've copied this script and changed out the file locations according, but BC4 runs and errors out on the script. I can seem to get it to work at all. Here is what I have have in the script file:


    load "W:" "S:\Craig Oliver\Pics"
    expand all
    select left.exact.files
    folder-report layout:summary &
    options:display-matches &
    output-to:clipboard
    move left->right.

    Any assistance is appreciated.

  5. #5
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    Make sure you don't include the period at the end of "move left->right." in your script, otherwise it will error with the message "A fatal error has occurred: Unexpected argument(s)".

    If you've verified you don't have . at the end of the last line, you can also try output to a file instead of clipboard in case there's an issue accessing the clipboard.

    load "W:" "S:\Craig Oliver\Pics"
    expand all
    select left.exact.files
    folder-report layout:summary &
    options:display-matches &
    output-to:c:\report.txt
    move left->right
    Chris K Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •