System script does not work
I created the following shell script as test:
folderSource="/Volumes/Macintosh HD/Library/FileMaker Server/Data/Documents/test/"
folderTarget="/Volumes/Macintosh HD/Library/FileMaker Server/Data/Documents/"
for myFile in *
mv "$myPath" "$folderTarget"
if [ "$?" != "0" ]; then
syslog -s -l notice "Error when moving file $myFile"
syslog -s -l notice "Moved file $myFile"
This script i placed inside the scripts folder of the FileMaker server. Whenever I create a new systemscript and I execute this script, I always get an error that the move was not successfull. However when i run this script in terminal it works like charm.
What is the cause of this problem? I have tried already many variants of this but without success everytime in the FileMaker server