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
Delete an original (Read 2519 times)
Thommen
YaBB Newbies
*
Offline



Posts: 11
Delete an original
May 9th, 2012 at 1:37pm
 
Hello,
First post on this fantastic software's forum  Smiley

I use a task to copy files into the Dropbox folder.
I noticed a Dropbox issue : when a file change but keep the same name, DB keep (in cache ?) the old file...
So I use the WD "Rename the existing filewith date/time" option.
But of course the old file (unrenammed) stay in the DB folder.
I want to delete it to not charge the DB and to not confuse the DB users with several versions of a +/- same file (minor changes force to create a new file).
How to do that ? Must I create a new task or is there a tip I can use with the WD copy option ?

To well understand, here is how the task runs :
I create a folder named automaticly by a 3rd party software, there is a subfolder int it nammed "Documents" --> this folder is watched by WD.
Eg : 12345ABC/Documents/file.txt
All files placed in this folder are copied  in a folder created by WD into a the DB folder like this : 12345ABC/file.txt
When the original file.txt is modified (in the "Dociments" folder), we have file.20120509123026.txt + file.txt

I hope you can help me, thank you in advance !

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



Posts: 2225
The Netherlands
Re: Delete an original
Reply #1 - May 9th, 2012 at 3:47pm
 
Hi,

If I understand you correctly, you want this to happen:

when file.txt is detected, try to copy it to "target directory".
if the file already exists in "target directory" copy it to file.<timestamp>.txt and remove all "older versions" (file.*.txt).

Is that correct? I think that can not be done by the "Copy Files" task, but will probably work with a little batch script using the "Run a bat file" task.

I will be happy to write the bat script for you (in the next few days), let me know if I understand the problem correctly.
Gert
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
 
Thommen
YaBB Newbies
*
Offline



Posts: 11
Re: Delete an original
Reply #2 - May 9th, 2012 at 11:33pm
 
Hi again and again Gert  Cheesy

That is it ! I write in blue some precision in your quote :

when file.txt
(any kind of file and extension exept the system files (.ini, thumb.db,...)
is detected
in a specific subdir (that have a fixed name) of a directory (totaly free name (letters, numbers...))
, try to copy it to "target directory"
that have the same name that the origin "totaly free name" directory.

if the file already exists in "target directory" copy it to file.<timestamp>.txt and remove all "older versions" (file.*.txt).

I hope you'll understand Wink
This topic is in relation with the other (Kind of mirroring but not a one) I've posted today.

Thank you again for this perfect support !

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



Posts: 2225
The Netherlands
Re: Delete an original
Reply #3 - May 11th, 2012 at 7:05am
 
Thommen,

I hope to get to this later today (this evening) or tomorrow. Can you send me an email (see below for my address) so we can "talk" about this outside the forum?
Oh, can you send me a backup of your current "Copy Files" task so I can have a look? See http://blog-en.gdpsoftware.com/2010/06/send-task-backup-to-support.html

Gert
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
 
Thommen
YaBB Newbies
*
Offline



Posts: 11
Re: Delete an original
Reply #4 - May 28th, 2012 at 2:51pm
 
Hello Gert,

After several days of testing, your solution works perfectly!
Thank you so much!

Thommen
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1