March 9, 201312 yr I want to delete a file from FileMaker in Windows.I want to send a event from FileMaker to do that.From the commandprompt I type:cmd/c del C:UsersTolDesktopinvoice.pdf  and that works,  but when tried to delete the file in a network drive (P:invoiceinvoices::id.pdf), i put the code  "cmd /c del " & Quote ( "P:Invoice "&Invoices::Invoice ID&".pdf")  in the calculation box for the event I get errors and it doesn't work, i can't figure out what am i doing wrong. Any help would be appreciated. Thanks  Â
March 9, 201312 yr The backslash in FileMaker is used to "escape" the next character; that is, inform Filemaker that the next character is a literal character and not a command character. So you have to use another backslash to tell FM that the backslash in the file path is literally a backslash in the string: "cmd /c del P:Invoice "&Invoices::Invoice ID&".pdf" see http://help.filemaker.com/cgi-bin/filemaker.cfg/php/xml_api/cci/fm_show_ans.php?p_faqid=456&p_sid=459394139 for perhaps a clearer explanation. PS-- You don't want to use the Quote() function because it places quotation marks around the expression.
March 10, 201312 yr Author Hi Doughemi, Thank you very much!!! It's been so long trying to figure this one out. Who would have thought about this "escape" thing. You have a lovely weekend. Hope my thread and your answer will help future users.
Create an account or sign in to comment