SRCDIR="source/directory"
TMPDIR="temp/directory"
[ ! -d "$TMPDIR" ] && mkdir -p "$TMPDIR"
for file in `find "$SRCDIR" -ctime -1 -type f -name "abc*pdf*"`; do
cp $file $TMPDIR
done
cd $TMPDIR
ext=`echo $file1|awk -F. '{if (NF>1) {print $NF}}'`
if [ $ext == "Z" ]; then
uncompress $file1
fi
done
I want to transfer file from Unix to Windows which are in $TMPDIR
. But I don't know how to connect Unix to Windows in the script.
I am using psftp
to transfer files from Unix to Windows manually. I want to automate this process using script.Can I use psftp
in script or can it be done using batch
script? Could someone help me how can I connect Unix to Windows.