syntax problems multiple commands (command & command)

Jun 6, 2011
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
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,491
90
Albuquerque, NM
prospero.unm.edu
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`
 
Jul 1, 2008
81
0
74
Montreal
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
 
Jun 6, 2011
7
0
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
Thread starter Title Forum Replies Date
M syntax for sftp with publickey Support 3
vefatica IDE external command syntax color? Support 1
Joe Caverly Command Input Syntax Colouring Support 3
C Nested IF syntax — TCC behaving differently to CMD Support 12
rps Documentation Regular expression syntax link broken Support 1
Dan Glynhampton Documentation v15 help: Syntax error in example of @DEC Support 0
D Syntax error when redirecting eval Support 5
C @diskfree[ ] syntax in 15.00.17 Support 0
T Syntax highlighting in the IDE Support 8
cgunhouse Eventlog Syntax issue Support 8
krischik Stop Script after Syntax Error. Support 6
C CMD's "nested quote" syntax Support 3
T TCTOOLBAR syntax Support 0
S Status line syntax help Support 2
H Double prompt for password with * in FTP syntax Support 3
dcantor FFIND syntax -- is /E"regex" /X supported? Support 2
C extended DIR syntax? Support 7
J Problem with %var:find=replace% syntax Support 5
A syntax colouring Support 0
dcantor Syntax files, and suggestion Support 0
J Problem with peculiar CMD syntax Support 2
Charles S. Roaten Problems with TCSTART.BTM Support 1
vefatica Office problems better Support 0
Peter Murschall TCC V26.01.3x Debugging has problems with Alias /R Support 1
Peter Murschall CMDebug 26.01.37 has problems with Alias Support 21
C unzip problems Support 2
C TCC 26 BATCOMP BTM problems? Support 5
Alpengreis WAD [v26 Beta RC3]: MSGBOX color problems Support 4
Alpengreis QUERYBOX problems Support 5
R New Cloud Storage Tab in TCC options causing problems Support 0
Craig Fitzgerald Problems using tcstart.btm Support 3
M Problems with @REGBREAD on remote system Support 4
K_Meinhard Help problems Support 3
S Problems with dir command in the debugger Support 5
D How to? Path problems in TCC20 Support 1
G Version 20.11 installed on Windows 10 problems Support 9
M WAD Set statements in () causes problems Support 8
M Fixed Set "VAR=VAL" format causes problems Support 12
H Problems with PSUBST Support 3
Alpengreis The TCMD Display problems and font size ... Support 2
cgunhouse Problems With IFTP Support 3
Gamegod Fixed TCC identify Chinese problems Support 30
vefatica 21-22 Update problems Support 8
T Problems with the new help format Support 18
cgunhouse Event Plugin Problems With 19.10.43 Support 2
C @replace and @xreplace problems Support 5
Alpengreis Forum problems? Support 0
N Fixed Problems with SHA256/384/512 Support 5
Alpengreis [TC 19.0 Beta 22/23] Install/Update-"Problems" Support 4
P Problems registering Support 5

Similar threads