答案 0 :(得分:9)
答案 1 :(得分:5)
尝试这样的事情
<cfscript>
i = 1;
myPath = 'D:\webroot\sap\returns\log';
myFileName = orderNumber;
</cfscript>
<cfloop condition="fileExists('#myPath#\#myFileName#.xml')">
<cfscript>
myFileName = '#orderNumber#_#i#';
i += 1;
</cfscript>
<cfif i GT 100><cfbreak /></cfif>
</cfloop>
<cffile action="write" file="#myPath#\#myFileName#.xml" output="#xmlString#" />
答案 2 :(得分:4)