Viewing Files With CFFTP

Explorer ,
Jul 16, 2012 Jul 16, 2012

Copy link to clipboard

Copied

I have established an SFTP connection with a client site but I cannot see the files in the directory because they do not have valid extensions. If I upload a file to the directory and add .txt to the end cfftp sees the file just fine but ignores all other files in the directory.

Is there a way to view all contents of a directory regardless of MIME type?

Views

508

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 28, 2015 Apr 28, 2015

Copy link to clipboard

Copied

Hello,

you can perform a listDir action.

ftpService = new FTP();

ftpService.setServer('your.server.com');

ftpService.setUserName('username');

ftpService.setSecure(true); // SFTP connection

ftpService.setPassword('passowrd');

ftpService.setDirectory('/') // for root

fileList = ftpService.listDir();

then, dump fileList and I think you'll find happiness.

Hope it helps

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 28, 2015 Apr 28, 2015

Copy link to clipboard

Copied

LATEST

Haha, thanks. Did not exactly answer the question, which you may note was posted 3 years ago. Unfortunately I cannot remember what I did to fix the issue or even which client I was working on this for. I guess it is never too late for a good follow up.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines