File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get zero bytes file from ftp

 
Rahul Chaudhari
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get zero bytes file from ftp.

How I can write ls command output to some file in ftp promte.
I tried using following,

ftp 10.x.x.45 << INPUT_ENDS
cd /home/dynamic/
ls *.csv > /home/dynamic/log/csvfile.txt
quit
INPUT_ENDS

I have full rights to log folder then also I cannot write file and not the output.

Please can any one tell me how to achive it.
Thanks...
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17639
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because you're working with an FTP server, not a remote shell server. For convenience, FTP's command set is similar to the standard command set, but the FTP shell isn't a command shell and it doesn't have all the command shell features.

The way to create an empty file on an FTP server is to upload an empty file to the FTP server. If your ftp client and local command shell permits it, that could include uploading an empty "here" file, but it's still got to be a file, even if it's only a temporary one.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic