Foldermonitor with /W option

Dec 2, 2008
226
2
Canada
I have been try /W10 with Foldermonitor, that is a 10 millisecond wait but nothing happen when something happens to the directory that would have fire the Foldermonitor. Take the /W10 off, fires as expected.
 
Dec 2, 2008
226
2
Canada
foldermonitor /S C:\JPSoft\logs /W10 CREATED DELETE MODIFIED RENAMED FOREVER c:\JPSoft\Batches\test.bat

I've tried placing the "/W10" in different places as well as putting a space between the "/W" and "10".


foldermonitor /S C:\JPSoft\logs CREATED DELETE MODIFIED RENAMED FOREVER c:\JPSoft\Batches\test.bat

Works fine.
 
May 20, 2008
11,432
99
Syracuse, NY, USA
Help nit: On the FOLDERMONITOR page, clicking "/S(ubdirectories)" does not take you down the page to the description of that option. It works for any of the other options.
 
May 20, 2008
11,432
99
Syracuse, NY, USA
(Below) Without "/W10", I hear the beep on the TOUCH but not on the DEL. With "/W10" I hear no beeps at all.
Code:
v:\> foldermonitor /S v:\ CREATED DELETE MODIFIED RENAMED FOREVER beep

v:\> touch /c file.tmp
2016-01-08 16:29:07.431  V:\file.tmp

v:\> del file.tmp
Deleting V:\file.tmp
  1 file deleted

v:\> touch /c file.tmp
2016-01-08 16:29:13.806  V:\file.tmp

v:\> del file.tmp
Deleting V:\file.tmp
  1 file deleted
 
Dec 2, 2008
226
2
Canada
Sorry my mistake on the DELETE instead of DELETED

foldermonitor /S C:\JPSoft\logs /W10 CREATED DELETED MODIFIED RENAMED FOREVER c:\JPSoft\Batches\test.bat

Still doesn't work, C:\jpsoft\logs is where TCC logs are stored so c:\JPSoft\Batches\test.bat should be firing constantly but nothing is happening.


foldermonitor /S C:\JPSoft\logs CREATED DELETED MODIFIED RENAMED FOREVER c:\JPSoft\Batches\test.bat


Without the "/W10" is firing constantly until I kill the TCC process.
 

rconn

Administrator
Staff member
May 14, 2008
12,367
150
OK. With that fixed, I get both sounds without "/W10" and no sounds with "/W10".

Two problems - you're using FOLDERMONITOR & /W incorrectly, and you don't understand how it works.

First, you would never use /Wn with something like a create / delete / rename, only with something like a write & modify. Which takes us to problem #2 - the way it works is that TCC calls the Windows API and waits for a change to the file / directory. When one happens, Windows returns the info and TCC starts its timer and calls the Windows API again. When another action occurs, TCC checks the timer to see if the wait period has been exceeded and if so, TCC executes the action specified in the FOLDERMONITOR call.

So if you only have the monitored event occur once, you won't see the action executed.

(Also, the /Wn needs to be the first argument to FOLDERMONITOR.)
 
Dec 2, 2008
226
2
Canada
I see how it works now; not what I was look for it to do. Instead I built the timing into the command the FolderMonitor fired. Not sure why there is an order dependency on the /Wn switch, but I guess there is a reason. Thanks.
 

rconn

Administrator
Staff member
May 14, 2008
12,367
150
I see how it works now; not what I was look for it to do. Instead I built the timing into the command the FolderMonitor fired. Not sure why there is an order dependency on the /Wn switch, but I guess there is a reason. Thanks.

FOLDERMONITOR has to know whether the /W is an option or part of the command action.
 
Similar threads
Thread starter Title Forum Replies Date
cgunhouse Foldermonitor with "/E" Option Issue Support 6
twaterloo Foldermonitor Bugs? Support 6
twaterloo FolderMonitor for the 1st time not working Support 5
vefatica FOLDERMONITOR: /= dialog creates malformed command Support 2
cgunhouse Foldermonitor Issue Support 7
C FOLDERMONITOR inactive with multiple /I Support 1
G FOLDERMONITOR created also firing for delete (and maybe other events) Support 7
vefatica Fixed FOLDERMONITOR causes crash Support 23
mikea FOLDERMONITOR confusions Support 7
cgunhouse Foldermonitor and iftp Support 1
T How to? Using FOLDERMONITOR 1 event causes multiple trigger(ing)s Support 8
Frank question to FOLDERMONITOR Support 14
S Log and foldermonitor problems Support 3
Steve Pitts FOLDERMONITOR missing events?? Support 7
J Still problems understanding "foldermonitor" Support 9
D Fixed TCMD /X option Support 7
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
D Purpose of DIRHISTORY /N option Support 2
Peter Murschall OPTION //directive=value is a ENDLOCAL Support 3
Charles Dye Does HASH's /E option do anything? Support 1
Charles Dye ASSOCIATE loses /P option Support 4
A Documentation [Help file] OPTION "//" synopsis formatting issue Support 0
thorntonpg option /u not working The directory name is invalid Support 5
rps TCMD Tabs priority option setting Support 0
A How to? TCMD Configuration Dialog: 'Smooth Scrolling' Option missing? Support 1
A Fixed (CMD compat) START /D fails to recognize the switch option. Support 3
R Fixed 7ZIP Compression Method Option Doesn't Work Support 1
D everything /o does not open the option dialog Support 4
fishman@panix.com How do I make the selections in the option menu sticky? Support 23
vefatica OPTION /U Support 2
Alpengreis TCC-Option for EnableDelayedExpansion (!var!) problem Support 15
D The BatchEcho option Support 8
D /extract: option for the installer Support 4
fishman@panix.com Why are the OPTION settings not sticky??? Support 11
vefatica OPTION /U Support 1
vefatica TPIPE's /perl option? Support 1
I TC "Registering" but NOT Registering, Now Hung on TCMD Option Screen Support 2
cgunhouse IFTP "/S" Option Support 6
Alpengreis [TC 17.x] Install with "option /u" failed Support 5
cgunhouse Jabber Command Line Option Being Transmitted -- Fixed with Build 42 Support 2
Charles Dye OPTION dialog appears underneath Take Command window Support 4
Charles Dye OPTION /U, private beta to public Support 4
Alpengreis WAD Command "MSGBOX /?" does not show option /N Support 2
Phileosophos Fixed Option Dialog Hangs when Using Help Support 7
M Web Help option in Take Command 15 broken? Support 3
fpefpe How to? start command /tab option/switch Support 6
S How to? Find installer downloaded by "option /u"? Support 11
W /g option (%) on MOVE cmd appears broken TCC 14.03.57 x64 Support 8
Charles Dye Odd behavior after using OPTION "Advanced" tab Support 2

Similar threads