Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

syntax problems multiple commands (command & command)

Jun
7
0
Hi there,

I am new to TCC and I especially focus on the "foldermonitor" function but having problem with the syntax when including multiple commands (only one command allowed with the function) with an "&" in the parentheses below:

foldermonitor /s "C:\Users\Gappe\Documents\My Dropbox\demo_local\inboxes" modified created 2 (set inbox_directory=%%_foldername & set inbox_file=%%_folderfile1)
echo %inbox_directory
echo %inbox_file

When executing the row and copying a file to the monitored folder I get the following error message:

[C:\Program Files\JPSoft\TCMD12]TCC: C:\Users\Gappe\Documents\TCC batfiles\Test foldermon
itor folderfile1 copy.bat [4] Unbalanced parentheses "(set inbox_directory=%_foldername
& echo %inbox_file "

I have not figured out how to solve this. Have tried many different alternatives (e.g. separate parentheses for both "set" commands etc) but it does not seem to solve the problem. Any suggestions? Help appreciated!

Furhtermore - where can I find a manual (not the help file)?

Best regards Jan
 
re: syntax problems multiple commands (command & command)

I am new to TCC and I especially focus on the "foldermonitor" function but having problem with the syntax when including multiple commands (only one command allowed with the function) with an "&" in the parentheses below:

foldermonitor /s "C:\Users\Gappe\Documents\My Dropbox\demo_local\inboxes" modified created 2 (set inbox_directory=%%_foldername & set inbox_file=%%_folderfile1)
echo %inbox_directory
echo %inbox_file

I'm not familiar with FOLDERMONITOR myself and can't enlighten you about any quirks in its syntax, but I suspect that you may have better luck using strong quotes instead of the parentheses:

Code:
foldermonitor /s "C:\Users\Gappe\Documents\My Dropbox\demo_local\inboxes" modified created 2 `set inbox_directory=%_foldername & set inbox_file=%_folderfile1`
 
re: syntax problems multiple commands (command & command)

I get the following error message:

[C:\Program Files\JPSoft\TCMD12]Unbalanced parentheses "(set inbox_directory=%_foldername
& echo %inbox_file "
I just ran the foldermonitor command. The inbox_file variable it defined includes the parenthesis at the end of your command:
Code:
inbox_file=%_folderfile1)
Try putting a space between "%%folderfile1" and the parenthesis.
--
Peter
 
re: syntax problems multiple commands (command & command)

Hi there,

Thanks for quick responses!
The "strong quote" solved it.
Thanks for link to manual.
Not been able so far to solve the problem with an additional space - but will keep it mind if similar problems should occur.
 

Similar threads

Back
Top