I have written a simple shell script which uses
ncftpput to recursively upload all directories in a local directory to a remote directory. My shell script,
upload.sh is placed in this local directory and I would like to exclude it from the upload. Is there any way to do this?
ncftpput -R -v -u myUsername -p myPassword myAddress /remoteDir /localDir/*
I have tried doing it like this:
for i in `ls /localDir | grep -v upload.sh`; do ncftpput -R -v -u myUsername -p myPassword myAddress /remoteDir /localDir/$i done
But directories with spaces will be considered two directories. E.g. "My Directory" will be considered: