tags:

views:

192

answers:

2

I'm using coldfusion 9 and I'm trying to grab a file from an ftp site and load it into ram instead of the filesystem. If I try it using a secure ftp connection, it fails with this error:

An error occurred during the sFTP getfile operation. Error: C:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\ram:\test.txt (The filename, directory name, or volume label syntax is incorrect). Check for a bad path, filename, or directory.

If I try the same thing with a non secure ftp site it works just fine. Here is the code:

<cfftp action = "open" 
username = "xxxxx" 
connection = "My_query" 
password = "xxxxxxx" 
server = "ftp.xxxxxx.com"
port="13266"
secure = "true" 
stopOnError = "Yes">

<cfftp action="getfile"
connection="My_query"
remoteFile="/something.txt"
stopOnError="true" 
localfile="ram://test.txt">
A: 

This looks like it might be correctable if you escape portions of the string.

Try replacing ram://test.txt

with

ram:///test.txt

Also, you can try escaping the ":" character.

This type of activity is only safe if you are an advanced user. Messing around with illegal characters when transferring files has an inherent risk of leaving garbage behind on your disk.

blueberryfields
I've tried what you suggested. The problem is that it works perfectly fine if the connection is not secure but as soon as I put secure="true" it gives me the bad path error so it must be an issue with the cfftp tag.
Scott Chantry
I saw that the problem only occurs when you use a secure connection, I figured maybe the problem is related to how the secure connection code escapes paths, and if you could feed it a manually escaped one, you might have a workaround
blueberryfields
+1  A: 

Adobe has confirmed this as a bug and has resolved it in ColdFusion 9.0.1

Scott Chantry