Originally posted by: paul.brett
I was recently asked to provide a cross platform method of removing 2 files immediately using a map. This was the solution I used, others are possible:
=IF(MID(GETDIRECTORY(),2,1)=":",GET("BAT","CMD /c if exist File1.zip del File1.zip > nul & if exist File2.zip del File2.zip > nul & echo done!"),GET("SHL","rm File1.zip File2.zip ; echo done!"))
Using the GETDIRECTORY() function with no argument gives me the map path, and then checking the second character for a colon (:) tells me whether this is Windows (or not).
Thank-you
Paul
Follow me on Twitter
#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender#DataExchange