Skip to main content
Inspiring
July 16, 2012
Question

Viewing Files With CFFTP

  • July 16, 2012
  • 1 reply
  • 636 views

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?

    This topic has been closed for replies.

    1 reply

    Foums
    Participant
    April 28, 2015

    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

    Inspiring
    April 28, 2015

    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.