WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Question about copying of amended files (Read 2581 times)
stixbri
YaBB Newbies
*
Offline



Posts: 3
Question about copying of amended files
Jun 22nd, 2012 at 9:46pm
 
Hi,

I have tried the trial version to copy files from one directory on another across PC's and it worked a treat  Smiley

My trial has since expired and before I purchase a copy of watchdirectory can you tell me if it can do the following....

JPG images will be placed in a folder automatically over the course of a day, if the jpg image is edited the filename will then automatically have a _1 included at the end of it eg. IMG_227.jpg will once edited and saved then become IMG_227_1.jpg

Can watchdirectory monitor for any amended images that have _1 within their filenames and then copy the amended images to another specified folder? I don't want to have the original images copied, only those that have the _1 within their filename. Is watchdirectory 'smart enough' to copy only the new amended images or will it copy over any previous amended images that it has already seen and copied?

Hope that I've made sense here with what I'm asking  Smiley

Regards,

Brian
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Question about copying of amended files
Reply #1 - Jun 23rd, 2012 at 7:41am
 
Hello Brian,

By default WD will copy all files created and/changed while the task is running. The way you describe it, it sounds like you only want to run the copy task "at the end of the day", is that correct?

For that to work, I think you need a little script with the "run a bat file" task. The script will be triggered for each file in the monitored directory and do basically:
* check the "type" of file (is it a plain jpg or an edited _1.jpg)
* check if a jpg with a "higher" sequence number (_2.jpg - is that possible?) is present. If present, do not copy the current file
* if there is no jpg with a higher sequence number present, copy the current file.

One problem I see with the example you gave... How can the script know if IMG_227.jpg is a file that is never modified OR a file that has been modified 227 times???
Is the only possible suffix (I call it sequence number above) _1 or can it be a higher number?

If you can explain a bit better, I will be happy to write the script for you.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
stixbri
YaBB Newbies
*
Offline



Posts: 3
Re: Question about copying of amended files
Reply #2 - Jun 23rd, 2012 at 8:26am
 
Hi Gert,

Thanks for coming back to me, here's hopefully a better explanation...

I will have a folder where jpg images are placed into it throughout the day. If any of these .jpg files are edited then they will be saved with an additional _1 included at the end of their filename. It is only those files with the _1 included at the end of their filename which I want copying to another folder. This is not an end of day task, this should take place as and when files are edited and saved  throughout any given time period.

For example....

At 9am the following files are place into Folder 1
IMG_001.jpg
IMG_002.jpg
IMG_003.jpg

Only IMG_001.jpg and IMG_002.jpg are edited and saved so now in Folder 1 we have....
IMG_001.jpg
IMG_001_1.jpg
IMG_002.jpg
IMG_002_1.jpg
IMG_003.jpg

What I'm after is that Watchdirectory sees that I now have 2 .jpg files with _1 at the end of their filenames and so watch directory only copies IMG_001_1.jpg and IMG_002_1.jpg to Folder 2. So in the folders we have...

Folder 1
IMG_001.jpg
IMG_001_1.jpg
IMG_002.jpg
IMG_002_1.jpg
IMG_003.jpg

Folder 2
IMG_001_1.jpg
IMG_002_1.jpg


Then at let's say 10am another 2 files of IMG_004.jpg and IMG_005.jpg are added to Folder 1, so now we have in Folder 1...
IMG_001.jpg
IMG_001_1.jpg
IMG_002.jpg
IMG_002_1.jpg
IMG_003.jpg
IMG_004.jpg
IMG_005.jpg

This time only IMG_005.jpg is edited and saved with the _1 included in its filename so now in Folder 1 we have...
IMG_001.jpg
IMG_001_1.jpg
IMG_002.jpg
IMG_002_1.jpg
IMG_003.jpg
IMG_004.jpg
IMG_005.jpg
IMG_005_1.jpg

Hopefully watchdirectory can now see that IMG_005_1.jpg has been added and it now copies only IMG_005_1.jpg to Folder 2. So in Folder 2 we now have...
IMG_001_1.jpg
IMG_002_1.jpg
IMG_005_1.jpg

This can go on and on throughout the day with a few hundred files being placed into Folder 1 and then some/all being edited and having the _1 included in their filenames.

Can watchdirectory recognise that it is not to copy over files from Folder 1 to Folder 2 which it has already copied or would it have to copy all of the _1.jpg files everytime?

Regards,

Brian



Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Question about copying of amended files
Reply #3 - Jun 23rd, 2012 at 8:42am
 
If it is really THAT simple, you can create a filter for your "copy" task, see http://www.watchdirectory.net/wdhelp/help/filter_events.html and the attached picture.

What this does is to only "trigger" for files who's name matches *_*_1.jpg (so filenames having 2 underscores and ending with _1.jpg). All other files (without 2 underscores) will be ignored.

If you want to test this, contact me (email) for a temporary license key.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
stixbri
YaBB Newbies
*
Offline



Posts: 3
Re: Question about copying of amended files
Reply #4 - Jun 23rd, 2012 at 9:34am
 
Thanks Gert, I have just sent you an email.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1