Operating System - HP-UX
1748154 Members
3746 Online
108758 Solutions
New Discussion юеВ

How to Transfer all files in the directory

 
LeenaK
New Member

How to Transfer all files in the directory

Hi
I want to Check for the existence of at least one file in the directory
If at least one file exists transfer each file that exists using NDM.

here is my code:
submit TOWB0033
process
snode=WB0033.TCP

outgoingFilePath="/apps/data"

DirListFiles=$(find $outgoingFilePath -type f -print)

for i in $DirListFiles
do
Filename=${i}
check if (-f $Filename) then

step01 copy from (file=$Filename
pnode)

to (file=$Filename
snode)

eif

done

pend ;

I'm not sure about the syntax of "FOR".
Can anyone plz help me with the code.

Thanks for ur help in advance.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: How to Transfer all files in the directory

Shalom,

while read -r filename
do
mv /source /dest/$filename
done < list

Possible better way to go.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven Schweda
Honored Contributor

Re: How to Transfer all files in the directory

I had never even heard of NDM before this.
You might get lucky here, but I'd guess that
you'd get better answers about NDM scripts in
some NDM forum somewhere.
OFC_EDM
Respected Contributor

Re: How to Transfer all files in the directory

NDM? Is that product which is in general terms like FTP?

I think the command is NDMRequest.

Maybe there's a man page on NDMRequest? I'd look to see if theres a switch for the command to transfer a directory only if populated with files.


The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: How to Transfer all files in the directory

Also which shell are you trying to write this in? I'm assuming on HP-UX.
The Devil is in the detail.
OldSchool
Honored Contributor

Re: How to Transfer all files in the directory

FWIW:

NDM - Network Data Mover.

It's now called Connect:Direct from Sterling Commerce I believe