Skip to content

Sriram19g/File-Transfer-Server-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

File-Transfer-Server-Client

This project is a TCP-based file transfer system that allows a client to interact with a server to perform various file operations such as listing files, uploading, downloading, deleting, and changing directories. The project consists of a server (server.py) and a client (client.py) implemented in Python.

Features

  • List Files: View the list of files available on the server.
  • Upload Files: Upload a file from the client to the server.
  • Download Files: Download a file from the server to the client.
  • Delete Files: Delete a file from the server.
  • Change Directory: Change the client's working directory.
  • Help: Get a list of available commands.
  • Logout: Disconnect from the server.

Requirements

  • Python 3.x
  • Network connection between the server and the client machines.

Project Structure

File-transfer-server-client/
│
├── server.py
├── client.py
└── README.txt

Installation and Setup

  1. Clone the Repository

    git clone https://github.com/Sriram19g/File-transfer-server-client.git
    cd File-transfer-server-client
  2. Set Server and Client Data Paths

    Make sure to update the SERVER_DATA_PATH in server.py and the CLIENT_DATA_PATH in client.py to valid directories on your machine.

  3. Run the Server

    On the server machine, run:

    python3 server.py

    The server will start and listen for incoming connections on the specified IP and port.

  4. Run the Client

    On the client machine, run:

    python3 client.py

    The client will connect to the server and you can start issuing commands.

Usage

Commands

  • LIST: List all the files from the server.

    LIST
  • UPLOAD : Upload a file to the server.

    UPLOAD example.txt
  • DOWNLOAD : Download a file from the server.

    DOWNLOAD example.txt
  • DELETE : Delete a file from the server.

    DELETE example.txt
  • CHANGEDIR : Change the client's working directory.

    CHANGEDIR /path/to/new/directory
  • LOGOUT: Disconnect from the server.

    LOGOUT
  • HELP: Get a list of available commands.

    HELP
  • CLEAR: Clear the screen.

    CLEAR
  • VIEW: View files in the client's current directory.

    VIEW

Example Session

Welcome to the File Server.
SERVER : ('192.168.1.10', 8888)
MYADDR : ('192.168.1.15', 12345)

---> LIST
[SERVER] : The files in the server directory are
           *example.txt
           *data.csv

---> UPLOAD newfile.txt
[SERVER] : File uploaded successfully.

---> DOWNLOAD example.txt
The file downloaded successfully.

---> DELETE data.csv
[SERVER] : The file is deleted successfully.

---> LOGOUT
[SERVER] : Disconnected from the Server.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

Acknowledgements

Contact

For any questions or feedback, please contact gsriram200@gmail.com.


Feel free to customize this README.txt file further according to your needs. This template provides a comprehensive overview of the project and its usage, which should be helpful for anyone looking to understand and use your File-Transfer-Server-Client system.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages