A simple command-line file transfer utility that allows you to send and receive files over TCP/IP with support for compression, encryption, directory transfers, and more.
Make sure you have .NET 9.0 SDK installed, then run:
dotnet buildThere are several ways to run the tests:
Open the solution in Visual Studio and use the Test Explorer to run the tests.
Use the provided PowerShell script to run tests with a timeout to prevent hanging:
.\scripts\run-tests.ps1dotnet testNote: Running tests directly with dotnet test may occasionally hang due to background processes. Use the PowerShell script if this happens.
The project includes Docker support for both the application and tests. Docker configuration files are located in the docker directory.
# Build the Docker image
docker-compose -f docker/docker-compose.yml build
# Run the application in Docker
docker-compose -f docker/docker-compose.yml up simplefiletransfer# Build and run the tests in Docker
docker-compose -f docker/docker-compose.yml build simplefiletransfer.tests
docker run --rm simplefiletransfertests:latestAlternatively, use the provided PowerShell script:
.\scripts\run-tests-in-docker.ps1To start receiving files, run:
dotnet run receiveThis will start a server on port 9876 that listens for incoming file transfers.
If you need to receive encrypted files, provide the password:
dotnet run receive --password mysecretpasswordTo send a file to another computer, run:
dotnet run send <host> <filepath>Where:
<host>is the IP address or hostname of the receiving computer<filepath>is the path to the file you want to send
Example:
dotnet run send 192.168.1.100 myfile.txtTo send multiple files at once:
dotnet run send <host> <file1> <file2> <file3>...Example:
dotnet run send 192.168.1.100 file1.txt file2.txt file3.txtTo send an entire directory and its contents:
dotnet run send <host> <directory_path>Example:
dotnet run send 192.168.1.100 mydirectoryThe following options can be added to any send command:
Use GZip compression:
dotnet run send 192.168.1.100 myfile.txt --compress
# or
dotnet run send 192.168.1.100 myfile.txt --gzipUse Brotli compression (better compression ratio):
dotnet run send 192.168.1.100 myfile.txt --brotliEncrypt the data during transfer:
dotnet run send 192.168.1.100 myfile.txt --encrypt mysecretpasswordEnable resume capability for interrupted transfers:
dotnet run send 192.168.1.100 myfile.txt --resumeTo list all incomplete transfers that can be resumed:
dotnet run list-resumeTo resume a specific transfer:
dotnet run resume <index>Example:
dotnet run resume 1If the transfer is encrypted, provide the password:
dotnet run resume 1 --password mysecretpasswordYou can queue multiple transfers to be executed sequentially:
dotnet run send 192.168.1.100 myfile.txt --queueQueue management commands:
dotnet run queue-list # List all transfers in the queue
dotnet run queue-start # Start processing the queue
dotnet run queue-stop # Stop processing the queue
dotnet run queue-clear # Clear all transfers from the queue- Simple command-line interface
- Progress bar showing transfer status
- Automatic directory creation for received files
- Error handling for common issues
- Uses TCP/IP for reliable transfer
- Supports files of any size
- Shows transfer speed and progress percentage
- Compression support (GZip and Brotli)
- Encryption support for secure transfers
- Directory transfers with automatic path preservation
- Multiple file transfers in a single operation
- Resume capability for interrupted transfers
- Transfer queue for sequential processing
- Hash verification to ensure data integrity
- Docker support for both application and tests
- The server runs on port 9876 by default
- Press Ctrl+C to stop the server
- Make sure the port is open in your firewall if needed
- Received files are saved to a "downloads" directory by default
- You can combine multiple options (e.g.,
--brotli --encrypt password --resume)
SimpleFileTransfer includes a web interface for easy file transfers. To use the web interface:
-
Start the SimpleFileTransfer API server:
dotnet run --project src/SimpleFileTransfer/SimpleFileTransfer.csproj -- --web -
Start the web application:
cd src/simplefiletransfer.web npm run dev -
Open your browser and navigate to the URL shown in the console (typically http://localhost:5173)
-
Use the web interface to transfer files with optional compression and encryption
The web interface provides a modern, user-friendly way to interact with SimpleFileTransfer:
- Transfer History: View all current and past file transfers with detailed status information
- Server Management: Start and stop the file transfer server directly from the web interface
- File Queue Management: Add files to the transfer queue, start/stop queue processing, and clear the queue
- Received Files List: Browse and download files that have been received by the server
- Transfer Options: Configure compression, encryption, and speed limits through an intuitive interface
- WebSocket Communication: Real-time updates using WebSocket technology for instant feedback
- Responsive Design: Works on desktop and mobile devices with a responsive layout

