Netcat for multiple file transfer.

From: Rajeev Kumar (
Date: 08/28/01

Message-Id: <>
From: Rajeev Kumar <>
Subject: Netcat for multiple file transfer.
Date: Mon, 27 Aug 2001 23:44:30 -0400

I have a situation where I have to copy multiple files from machine 'A' to
machine 'B' using netcat. For transfer of single file I can use netcat
command something like below on machineA and machineB.

machineB% nc -l -p 9000 > file1
machineA% cat file1 | nc machineB 9000

Now I want to automate this process by using scripts or any nifty trick of
netcat so that I can transfer multiple files (file1, file2, file3 ...) from
machineA to machineB without manually typing server and client netcat command
'nc' each time. Restriction is I have to transfer these files serially. i.e
I would like to transfer file2 when file1 transfer is done and so on.

Any suggestions, pointers ?


	Rajeev Kumar (

---------------------------------------------------------------------------- This list is provided by the SecurityFocus Security Intelligence Alert (SIA) Service. For more information on SecurityFocus' SIA service which automatically alerts you to the latest security vulnerabilities please see: