WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Kinf of mirroring but not a one
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1336564313

Message started by Thommen on May 9th, 2012 at 1:51pm

Title: Kinf of mirroring but not a one
Post by Thommen on May 9th, 2012 at 1:51pm
Hello again,

here is my second post  :)

I know WD is not a software for mirroring.
What I looking for is when I delete or move a watched folder containing differnts files, the target folder (where WD copy the files) is deleted.

The structure of the watched folder is : 12345ABC/Documents/files.txt (on C:/)
The target folder structure (created dynamicly by WD) is : 12345ABC/files.txt (on Z:/)

So when I move the C:/12345ABC folder (for archiving), I want the Z:/12345ABC folder delete.
How to do that ? I tried with batch but my knowledge is very limited in it.

I've noted that the run option DELDIR is not available in the files copy option in WD. I use all my tasks as Windows Services (W 2008R2) and with Fast method.


I thank you for your help again !

Thommen

Title: Re: Kinf of mirroring but not a one
Post by Gert on May 9th, 2012 at 3:48pm
Hello Thommen,

Yes, that is possible with a batch script, I will be happy to write it for you (but I am a bit busy in the next few days).
When, from your example, Z:/12345ABC should be removed (because C:/12345ABC is moved/removed) should all contents of Z:/12345ABC be removed as well?

Gert

Title: Re: Kind of mirroring but not a one
Post by Thommen on May 9th, 2012 at 11:08pm
Hello Gert,

Yes, that's it ! All the contents of target folder 12345ABC must be removed.
Note that the target folder name is dynamicly created by WD.

the exact path for the watched directory is c:/DIR/SUB1/12345ABC/SUB3/file.ext
the exact path for the target is c:/DIR/SUB1/SUB2/SUB3/SUB4/12345ABC/file.ext

the directory name 12345ABC is an example, it could take any name (letters, numbers, _, -)

I never used WD for launching a bat and I thank your proposition to write a batch for that !

Thommen

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.