1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

syntax problems multiple commands (command & command)

Discussion in 'Support' started by Jang, Jun 6, 2011.

  1. Jang

    Joined:
    Jun 6, 2011
    Messages:
    7
    Likes Received:
    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
     
  2. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    646
    Likes Received:
    1
  3. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    re: syntax problems multiple commands (command & command)

    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`
    
     
  4. Peter Bratton

    Joined:
    Jul 1, 2008
    Messages:
    81
    Likes Received:
    0
    re: syntax problems multiple commands (command & command)

    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
     
  5. Jang

    Joined:
    Jun 6, 2011
    Messages:
    7
    Likes Received:
    0
    re: syntax problems multiple commands (command & command)

     

Share This Page