---
title: "interact with external disk files and ftp in java"  
description: "interact with external disk files and ftp in java"  
author: "greg DORIAN"  
published: 2015-03-28  
updated: 2015-03-30  
canonical: https://www.mindstick.com/forum/23065/interact-with-external-disk-files-and-ftp-in-java  
category: "java"  
tags: ["javac"]  
reading_time: 1 minute  

---

# interact with external disk files and ftp in java

hi i need to make a [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) that I can interact with [files](https://www.mindstick.com/articles/23302/the-importance-and-advantage-of-keeping-your-important-files-on-the-cloud) in a [external](https://www.mindstick.com/articles/12810/how-to-connect-tablet-to-external-monitor-or-flat-screen-tv-using-computer-adapters) [disk](https://answers.mindstick.com/qa/96923/what-are-hard-disk-partitions) and [ftp](https://www.mindstick.com/articles/33718/ftp-vs-sftp-understanding-these-two-meanings) in java... with a external disk i think that I'll use the java.io.File [library](https://www.mindstick.com/forum/34615/software-framework-vs-library) but ftp I don't know!!!\
when I say interact with files ... is [copy](https://www.mindstick.com/forum/161993/explain-the-numpy-array-copy-vs-view-with-example), [delete](https://www.mindstick.com/forum/33620/how-to-delete-record-from-list-in-mvc-using-ajax), [count](https://www.mindstick.com/forum/157774/selecting-count-with-distinct) and list files in a [directory](https://www.mindstick.com/forum/226/how-to-get-application-directory-using-c-sharp-csharp)

## Replies

### Reply by Manoj Pandey

For interact FTP server use Apache Commons Net API. It is easy to write Java code for downloading a file from a remote FTP server to local computer. It has simple and comprehensive API that makes coding with upload files to FTP server with ease.

Download Apache Commons Net API

After install apache commons Net api, import this

\

```
import org.apache.commons.net.ftp.FTP;import org.apache.commons.net.ftp.FTPClient;
```


---

Original Source: https://www.mindstick.com/forum/23065/interact-with-external-disk-files-and-ftp-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
