Author |
Message |
Alice
Joined: 29 Jan 2015 Posts: 283
|
Posted: Tue Sep 08, 2020 8:58 am Post subject: Use a Mirror Job to delete data at Level 3 and below |
|
|
Hi there
is it possible to use a Mirror Job to replicate an empty folder at Source onto an existing Destination structure, such that only files and folders at Level 3 and below in the Destination would be erased by that Mirror operation.
eg Destination structure is :
Level 1
C:\My Data
Level 2
C:\My Data\2019
C:\My Data\2020
C:\My Data\2021
Level 3
C:\My Data\2019\Finance
C:\My Data\2019\Reports
C:\My Data\2019\Year End
C:\My Data\2020\Finance
C:\My Data\2020\Reports
C:\My Data\2020\Year End
C:\My Data\2021\Finance
C:\My Data\2021\Reports
C:\My Data\2021\Year End
so the folders in bold and their children would be deleted only
Thanks as always
A. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8769
|
Posted: Wed Sep 09, 2020 12:57 am Post subject: |
|
|
Hi , try these file filters:
Exclude>C:\My Data\*
Exclude>C:\My Data\*\*
Include>C:\My Data\*\*\*
Are the folders:
C:\My Data\2019
C:\My Data\2020
C:\My Data\2021
without any files in them? _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 283
|
Posted: Wed Sep 09, 2020 7:39 am Post subject: |
|
|
Hi and thanks for the guidance.
What I've presented is a simplified example, there are in fact 120 folders at level 3 and yes there could be many many files at Level 2.
Basically this is a 'purge' of old data, but I wanted to keep the folder structure down to Level 2 'in-place' to make it easier to review - a quick 'memory jog', without having to open old spreadsheets of the original data structures, unless I have to !
Might be easier for me to use VV to create the current structure elsewhere (Taxonomy Job - ie without the files) delete the original structure in full and then copy back the parts of the Taxonomy structure that I need, ie down to Level 2.
Thanks again
A. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8769
|
Posted: Thu Sep 10, 2020 12:37 am Post subject: |
|
|
You could try using relative paths:
Exclude>\*
Exclude>\*\*
Include>\*\*\*
Then you do not need to specify each subfolder individually.
Try a comparison with the above filters to see if files are excluded as you expect.... _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 283
|
Posted: Fri Sep 11, 2020 9:26 pm Post subject: |
|
|
Hi there, thanks for the advice.
So I tried the following as Sub-Folder Filters :
Exclude>\*
Exclude>\*\*
Include>\*\*\*
with setting 'No empty source/target check' turned 'on'.
This is all good and works, but there may well be files directly in these folders :
C:\My Data\2019
C:\My Data\2020
C:\My Data\2021
and these files are not deleted with the Sub-Folder Filters listed above applied...
we are close to a solution though ! Thank you |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8769
|
Posted: Tue Sep 15, 2020 12:29 am Post subject: |
|
|
Hi, do you want to delete the files that are in :
C:\My Data\2019
C:\My Data\2020
C:\My Data\2021
Or only files and folders at Level 3 and below? _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 283
|
Posted: Tue Sep 15, 2020 7:52 am Post subject: |
|
|
Both conditions you mention are true.
Sorry for not being clear.
So :
1) purge anything (files and folders) at or below Level 3
2) purge files only at Level 2, leaving the folders at Level 2 in place |
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 283
|
Posted: Fri Sep 18, 2020 7:55 am Post subject: |
|
|
I'm assuming this can't be done
....maybe in VV 4 ? |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8769
|
|
Back to top |
|
|
|