I am sorry if someone asked this question gain, but I didn't find a solution which worked for me.
I wrote a small bash script, which works with normal folders. It should run a command for every Subfolder. But if there is a space in a Folder Name, there is a problem.
If there is a Folder called "New Folder" in /share/Download, the script will try to access to the folder "/share/Download/New" (instead of "New Folder")
i also tried with echo "$d"
for d in `find /share/Download -mindepth 1 -type d`
do
echo
echo $d
curl http://localhost:2345/api/command -X POST -d '{"name": "something", "path": "'"$d"'"}' --header "X-Api-Key:123456789"
echo
done