Hello! I am writing a KornShell script that (in addition to other things) sends a file from a Unix directory to a SharePoint directory. However when executing the script there is no sign of the file on the SharePoint.
I have tested the script using my personal email as the destination and the files are sent correctly (as attachments). I have also tried sending an email with attachments to the SharePoint through Outlook and the files are correctly uploaded. There is some sort of disconnect though when attempting to send files to the SharePoint via the script.
My code:
# Change Internal Field Seperator (IFS) to account for spaces in filename
IFSSAVE=$IFS
IFS='
'
# Mail most recent outage report to share point
for file in `ls -1t $outageFileName | head -n 1`
do
fullPath=$filePath$file
uuencode $fullPath ${fullPath##*/} | mailx -m -s "Outage Report" $spEmail
done
# Mail most recent job report to share point
for file in `ls -1t $jobFileName | head -n 1`
do
fullPath=$filePath$file
uuencode $fullPath ${fullPath##*/} | mailx -m -s "Job Report" $spEmail
done
# Reset IFS
IFS=$IFSSAVE
Q: Why are the files not being uploaded to the SharePoint and how can I alter the script to properly upload the files?
Thanks,
Matt