login about faq

Consider a file names __~1.THU (the underlines represent spaces) When I use CkoFtp2 component to list:

NSLog(@"%@", [ftp GetFileName:[NSNumber numberWithInt:0]]);

The output is ~1.THU

Is there any method to handle this ?

asked Apr 09 '13 at 00:32

Noin's gravatar image


edited Apr 09 '13 at 00:46

The problems likely stem from the fact that FTP is an old protocol and directory information is obtained by parsing directory listings that were originally meant for human viewing. You should examine the contents of the SessionLog property to see what kind of directory listing is being parsed. It's likely a problem that can't be resolved.

I have to add one general comment: It amazes me that anyone would choose to create filenames with leading or trailing SPACE characters. This is just asking for trouble. Why not avoid naming files like this in the first place?


answered Apr 09 '13 at 09:01

chilkat's gravatar image

chilkat ♦♦

Thanks. I'll examine the SessionLog.

(Apr 09 '13 at 10:46) Noin
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Apr 09 '13 at 00:32

Seen: 608 times

Last updated: Apr 09 '13 at 10:46

powered by OSQA