WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Questions befor buying
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1437912532

Message started by Darwin74 on Jul 26th, 2015 at 2:08pm

Title: Questions befor buying
Post by Darwin74 on Jul 26th, 2015 at 2:08pm
Hello,

I have a few Questions befor buying WatchDirectory.

Will existing Files with same Name automaticly overwritten on the Server during Ftp-Upload ?

Is it with Dynamic Name Creation possible to create numbered Files from 1-4 in a new Directory and then start again with 1.
For example Pic001.jpg to Pic004.jpg and then starting again with Pic001.jpg overwriting the old one.

Thanks and regards
Michael


Title: Re: Questions befor buying
Post by Gert on Jul 27th, 2015 at 8:59am
Hi,

Yes, existing files will be overwritten during the FTP upload.

To give the files a numbered suffix, you could use the following dynamic name (I left out the path):

pic00{code{get1234.bat,}}

This will call the get1234.bat script to determine the numeric suffix. You should store this script inside the
C:\Program Files (x86)\WatchDirectory\Resolvers
directory.

Here is an example script you can use
[code]
rem special case if you are configurin/changing the task
IF "%WD_CALLEDFROMSETUP%" EQU "Y" GOTO :CalledFromSetup

rem the bat file that will have the current suffix (1 - 4)...
SET TBAT=C:\Temp\1234.bat

IF NOT EXIST "%TBAT%" ECHO SET COUNTER=1 > "%TBAT%"

CALL "%TBAT%"

ECHO %COUNTER% >> "%WD_RESULTFILE%"
SET /A COUNTER=%COUNTER% + 1
IF %COUNTER% GEQ 5 SET COUNTER=1

ECHO SET COUNTER=%COUNTER% > "%TBAT%"
EXIT


:CalledFromSetup
rem always use the number 4 when changing the task
ECHO 4 >> "%WD_RESULTFILE%"
EXIT

[/code]

Title: Re: Questions befor buying
Post by Darwin74 on Aug 3rd, 2015 at 7:49pm
Thanks Gert !

I will try this within the next weeks.
I`m about to build a Homepage wich shows always the last actual 4-6 Pictures taken by an automatically Camera.

Best regards
Michael


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