#1 2012-05-17 21:56:00

stan_d
Member
Registered: 2011-05-12
Posts: 17

tFTPPut escaping filenames

Hi all, I'm having a very annoying problem with tFTPPut operation on linux.

Some of the files that are getting uploaded have characters such as brackets which you need to escape if you're trying to open them in terminal.
For example, test(1).txt would end up being test\(1\).txt

The problem is whether they are escaped or not, tFTPPut can't see those files and outputs a "No match file exist!" error.

See screenshots of test job attached.
Disregard the fact that the component's name is "binary" even though I'm transferring an ascii file.

Screenshot 1: Entire job
2: tJava component code which escapes the brackets and prints out the final path (in this case: /home/stan/dev/nei/files/nei/213/1/test1\(1\).txt, which is correctly escaped)
3: The tFTPPut component

Error is still No match file exist!
Ideas? Workarounds?

Thanks!


Uploaded Images

Last edited by stan_d (2012-05-22 15:15:53)

Offline

#2 2012-05-17 22:00:26

stan_d
Member
Registered: 2011-05-12
Posts: 17

Re: tFTPPut escaping filenames

Interestingly, spaces in filenames are not a problem.

Offline

#3 2012-05-22 15:16:31

stan_d
Member
Registered: 2011-05-12
Posts: 17

Re: tFTPPut escaping filenames

No ideas? Can someone confirm that filenames with brackets in them do get matched properly in Windows?
I'm assuming it's a Linux thing, but I'm not sure of that either.

Offline

#4 2012-05-23 09:16:51

st_germain
New member
Registered: 2012-04-28
Posts: 5

Re: tFTPPut escaping filenames

Do you tested the transfer manually? Like this:

echo "Hello" >test\(1\).txt
FTP> .... commands for login ....
331 User name okay, need password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ascii
200 Type set to A.
ftp> put test(1).txt
200 PORT command successful.
150 Opening ASCII mode data connection for test(1).txt.


Perhaps you have the filename pass trough ftp without the braces to escapes:
I tryed it with cygwin (Unix under Windows) see above

Offline

#5 2012-05-23 15:43:16

stan_d
Member
Registered: 2011-05-12
Posts: 17

Re: tFTPPut escaping filenames

Thanks for the suggestion. I just tried it manually and it worked fine.

I ended up changing the code around the initial user file upload to rename any files with brackets in them as a workaround.
Strange problem!

Offline

Board footer

Powered by FluxBB