Skip to main content
Inspiring
July 16, 2012
質問

Viewing Files With CFFTP

  • July 16, 2012
  • 返信数 2.
  • 642 ビュー

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?

    このトピックへの返信は締め切られました。

    返信数 2

    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

    mackaboogie作成者
    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.