Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


plotnd
2017-07-07T14:59:09Z
I am trying to design a custom backup, where (with some exceptions) a backup folder perfectly mirrors a target folder and its subfolders. I have a few questions below. If there is a better way to mirror a target folder, I would love to hear it.


In my mind, this requires 3 tasks:
(1) Trigger on file creation/change => copy file + replace if copy is newer [successful]

(2) If a file is renamed, rename it in the backup. [Not working]
This issue is that I cannot figure out how to get the original name of the file. Variables=>Triggers=>File=>Result=>Name only returns the value of the new filename. If I solve this issue, I think I can get it to work.
SO - How do you get the original filename of the triggering renamed file?

(3) If a file is deleted, delete it on the mirror. [Partially working]
Here, the problem is getting the path within the subfolder structure. The two options I see are to use the Trigger file result:
(a) Name, which deletes ALL instances of the filename within the target folder (not just the one I actually deleted). For example, if I have a bunch of files named 'log.txt', and I delete one in the source folder, it deletes ALL of the files named 'log.txt' in the mirrored folder, regardless of where in the subfolder structure they reside.

(b) Path. The issue here is that the variable value is the full-path of the file, including the drive name, and any superfolders containing my target folder. I just want to capture the path name starting at the target folder, so I can create a file mask that deletes ONLY the 'log.txt' file in that subfolder.

SO - How do you delete only the copy in the appropriate mirrored subfolder? I don't want to manually do this for every sub-folder, and something like this must be possible as in the "copy file" task, if "create subfolders" is selected, it will place the copied file into the correct location and not overwrite every iteration of e.g. 'log.txt'

Cheers in advance,
-Dan
Sponsor
Forum information
Support
2017-07-11T19:23:45Z
Hi,

2. we have added these two Variables here: http://www.visualcron.co....aspx?g=posts&t=7329 
3. I do not see why using the NAME and target path is a problem. Why would there be several files with the same name?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top