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
multiple folders (Read 3957 times)
fatihfx
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 6
multiple folders
Oct 28th, 2004 at 5:20pm
 
i use multiple folder. i want , set my multiple folders then if main folder changed then all chenges set my multiple folders.

sample.
-------------------------------------
main folder (watching) : c:\A

other folder:

c:\B
c:\D
c:\E
d:\F
--------------------------------------

if i copied a file in c:\A folder then watchdirectory copy new file other directory (b,d,e,f)

Or DELETE
Or UPDATE
OR any

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



Posts: 2225
The Netherlands
Re: multiple folders
Reply #1 - Oct 28th, 2004 at 10:58pm
 
Hi,

The easiest way to do this is with 2 .bat files.
Copy the WDAutoCopy.bat from the samples directory to, for example, C:\Bin
Create a new .bat file (name it C:\Bin\CopyAll.bat), that has the following code:
Code:
SET TARGETDIR=C:\B
Call C:\Bin\WDAutoCopy.bat
SET TARGETDIR=C:\D
Call C:\Bin\WDAutoCopy.bat
SET TARGETDIR=C:\E
Call C:\Bin\WDAutoCopy.bat
 



You also need to change the WDAutoCopy.bat file, remove the line that reads:
Code:
SET TARGETDIR=C:\TARGET
 


and also the first few lines inside it (as instructed in the .bat file).
Let watchDirectory start the C:\Bin\CopyAll.bat file for all changes.

That should do the trick!

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


I love YaBB 1G - SP1!

Posts: 6
Re: multiple folders
Reply #2 - Oct 29th, 2004 at 2:20pm
 
this method is not working.

untitled1.bat :

SET TARGETDIR=C:\Documents and Settings\Administrator\Desktop\test1\
Call C:\Documents and Settings\Administrator\Desktop\WDAutoCopy.bat
SET TARGETDIR=C:\Documents and Settings\Administrator\Desktop\test2\
Call C:\Documents and Settings\Administrator\Desktop\WDAutoCopy.bat
SET TARGETDIR=C:\Documents and Settings\Administrator\Desktop\test3\
Call C:\Documents and Settings\Administrator\Desktop\WDAutoCopy.bat


WDAutoCopy.bat :

GOTO EndRemarks

:EndRemarks

IF NOT "%WD_RELDIR%" == "" SET TARGETDIR=%TARGETDIR%\%WD_RELDIR%

GOTO %WD_REASON%

:DIRREN
:DIRNEW
MD "%TARGETDIR%\%WD_FILE_N%"
GOTO QUIT

:FILEREN
:FILENEW
:FILECHNG
COPY "%WD_FILE%" "%TARGETDIR%"
GOTO QUIT

:DIRDEL
GOTO QUIT

:FILEDEL
GOTO QUIT

:DIRCHNG

GOTO QUIT

:QUIT

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



Posts: 2225
The Netherlands
Re: multiple folders
Reply #3 - Oct 29th, 2004 at 10:30pm
 
Please remove the backslash (\) at the end of your SET statements, and place "quotes" around the .bat file name you call so it becomes:

[code]
SET TARGETDIR=C:\Documents and Settings\Administrator\Desktop\test1
Call "C:\Documents and Settings\Administrator\Desktop\WDAutoCopy.bat"
[/code]
I don't know WHY Microsoft decided to allow spaces inside filenames, they always cause trouble...

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


I love YaBB 1G - SP1!

Posts: 6
Re: multiple folders
Reply #4 - Nov 1st, 2004 at 6:21pm
 
thanx. now working.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1