AnsweredAssumed Answered

Concatenate with "\" works different than with "/"??

Question asked by ChristianNissen on May 28, 2016
Latest reply on May 28, 2016 by beverly

I would like to make a string that will be used to make new directories in a Windows storage environment, from INSIDE an FM-script.


I start with entering a project number into a textfield of a new post/row/record in a table, (typically YYWWNN YearWeekNumberof project that week, like 162101) when exiting that field (to the next field of the new post/row/record) I trigger a script (using functions) to take that string, hack it up into 16, 21, 01 and concatenate a string showing where on disk, documents related to that project number will be stored.


I am using three variables like $var1 = "16" ....


Sought after result would be like "C:\projects\16\21\01\"


I have found a nice way to make the directories using "send event" and MKDIR, once the string is right, however.....


The concatenation made, using a script using the function window will NOT accept $variablename = "C:\projects\" & $var1 & "\"

but works fine with $variablename = "C:/projects/" & $var1 & "/" It also works fine with an extra blank after the \, like $variablename = "C:\projects\ " & $var1 & "\ " but NOT without the extra blank...



So I can have "C:/projects/16/21/01" or "C:\projects\  16\  21\  01" but NOT "C:\projects\16\21\01\"?


I can´t see the reason and can´t find anything on it with google, nor in Filmakers documentation?? HELP