Just use cfobject to call java.io.File and init the object with the full
current filename.
Create another file object with the destination file path and call
oldFileObject.renameTo(newFileObject)
Some think like...
<cfscript>
fileObj = createObject("Java", "java.io.File");
fileObj.init("d:\sites\test\test.cfm");
newFileObj = createObject("Java", "java.io.File");
newFileObj.init("d:\sites\test.cfm");
fileObj.renameTo(newFileObj);
</cfscript>
Works for me.
Craig.
-----Original Message-----
From: Nathan Strutz [mailto:[EMAIL PROTECTED]
Sent: 06 October 2003 21:11
To: CF-Talk
Subject: cffile moving on linux
Hey all, I'm having a little trouble setting up my site on
Linux. We're
kinda testing the waters to see if it's worth getting wet.
As I was saying, cffile isn't working for me. I've got a part
where I upload
an image and stick it in the GetTempDirectory() folder. From
there I
cfcontent it to view a preview of it, then, on approval, move it
to the
final destination I just created. This is where it errors out,
giving me:
The value of the attribute source, which is currently
"/opt/jrun4/servers/cfusion2/SERVER-INF/temp/cfusion-war-tmp/3122706.jpg
",
is invalid.
The photo does exist, as does the destination folder. The
permissions are
set to root-root rw-r-r, and I have confirmed Jrun logs in as
root. I can
copy the file to the final destination and delete the original,
but I just
can't move it.
Any insight would be appreciated. Thanks!
-nathan strutz
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

