- Jun
- 744
- 16
The help for the FOLDERMONITOR command says that the "/Wn" option waits "n milliseconds". I put in "/w500", and the command never ran (for as long as I was willing to wait). At first I thought that instead of milliseconds, the time unit was Windows ticks, but after even that time elapsed, I thought it must be "seconds". I tried "/W1" and the delay did seem to be one second.
I also noticed that running the command with no arguments does not show that wait time value. It would be good if it did.
Also, it seems that the command specified by FOLDERMONITOR does not run unless the TCC session from which it was launched is currently active. From another TCC session (with a different current directory), I created a new file in the monitored directory, and the script command did not run. When I used a command from the other TCC session that had a delay and I switched back to the original session, the command did run after the file was created (and with the 2-second delay I programmed using "/W2").
I also noticed that running the command with no arguments does not show that wait time value. It would be good if it did.
Also, it seems that the command specified by FOLDERMONITOR does not run unless the TCC session from which it was launched is currently active. From another TCC session (with a different current directory), I created a new file in the monitored directory, and the script command did not run. When I used a command from the other TCC session that had a delay and I switched back to the original session, the command did run after the file was created (and with the 2-second delay I programmed using "/W2").