I am using the following in a rule to run a compiled map.
=VALID(RUN("FtpPut.mmc", "-IE1S" + NUMBERTOTEXT(SIZE(RoutingData)) + " " + TEXT(RoutingData) + " -IF2 " + SUBSTITUTE(SUBSTITUTE(GETRESOURCENAME(RoutingData), GETDIRECTORY(RoutingData), ""), ".txt", ".837")), FAIL ( " Failure on RUN function for FtpPut.mmc. Return Code = " + TEXT ( LASTERRORCODE ( ) ) + ": " + LASTERRORMSG ( ) ) )
This works if I put the file specified by the file input override (IF2) in the directory of the compiled map, but I need to specify the directory in which the file exists. I have tried specifying the directory for IF2 in both UNC and using a drive letter but with no success. Below is one of the attempts to specify the directory.
=VALID(RUN("FtpPut.mmc", "-IE1S" + NUMBERTOTEXT(SIZE(RoutingData)) + " " + TEXT(RoutingData) + " -IF2 s:\Outgoing\" + SUBSTITUTE(SUBSTITUTE(GETRESOURCENAME(RoutingData), GETDIRECTORY(RoutingData), ""), ".txt", ".837")), FAIL ( " Failure on RUN function for FtpPut.mmc. Return Code = " + TEXT ( LASTERRORCODE ( ) ) + ": " + LASTERRORMSG ( ) ) )
The documentation says that I must specify the directory if the file is not in the directory of the compiled map but there is no example. Does anyone have any suggestions?
Thanks
Clint
=VALID(RUN("FtpPut.mmc", "-IE1S" + NUMBERTOTEXT(SIZE(RoutingData)) + " " + TEXT(RoutingData) + " -IF2 " + SUBSTITUTE(SUBSTITUTE(GETRESOURCENAME(RoutingData), GETDIRECTORY(RoutingData), ""), ".txt", ".837")), FAIL ( " Failure on RUN function for FtpPut.mmc. Return Code = " + TEXT ( LASTERRORCODE ( ) ) + ": " + LASTERRORMSG ( ) ) )
This works if I put the file specified by the file input override (IF2) in the directory of the compiled map, but I need to specify the directory in which the file exists. I have tried specifying the directory for IF2 in both UNC and using a drive letter but with no success. Below is one of the attempts to specify the directory.
=VALID(RUN("FtpPut.mmc", "-IE1S" + NUMBERTOTEXT(SIZE(RoutingData)) + " " + TEXT(RoutingData) + " -IF2 s:\Outgoing\" + SUBSTITUTE(SUBSTITUTE(GETRESOURCENAME(RoutingData), GETDIRECTORY(RoutingData), ""), ".txt", ".837")), FAIL ( " Failure on RUN function for FtpPut.mmc. Return Code = " + TEXT ( LASTERRORCODE ( ) ) + ": " + LASTERRORMSG ( ) ) )
The documentation says that I must specify the directory if the file is not in the directory of the compiled map but there is no example. Does anyone have any suggestions?
Thanks
Clint