> Here is what happens > 1) the code appears to execute without issue > 2) no directory is created > 3) no error of any kind is returned You can get the expandPath() of the file you want to write.. and try this..
<cfscript> fw = createObject("Java","java.io.FileWriter").init("C:\\Inetpub\\wwwroot\\test\\ test.txt",true); fw.write("Today is #now()#"); fw.flush(); fw.close(); </cfscript> java.io.File might require additional stuff... havent used it.. Joe Eugene ----- Original Message ----- From: "McNamara Kyle W CONT PORT" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, September 15, 2003 1:42 PM Subject: using java.io.File with cfobject > Hello, > > I am attempting to use the java.io.File with cfobject and: > > <cfobject type="JAVA" name="jFile" class="java.io.File" action="CREATE"> > <cfscript> > newDir = jFile.init('\\\\servername.domain\\dirthis\\dirthat'); > newDir.mkdir(); > </cfscript> > > Here is what happens > 1) the code appears to execute without issue > 2) no directory is created > 3) no error of any kind is returned > > we have a win2k box and I am creating this dir on another win2k machine > using the UNC path. > > Any ideas? > > Thank you! > > Kyle > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com