#!/usr/bin/env bash folder=Janvier for file in /Users/bruno/Pictures/_Canon/Export/2023/Janvier/* do #curl -u username:password -T ${file} http://www.example.com/folder/${file} # crée l'arborescence #/opt/homebrew/opt/curl/bin/curl --user funnymac:a3XELN4PHTYF9fFHtsY97eshXBxxFo --ftp-create-dirs -T ${file} sftp://ftp.cluster011.ovh.net:22/home/funnymac/www/ftp/${file} /opt/homebrew/opt/curl/bin/curl --user funnymac:a3XELN4PHTYF9fFHtsY97eshXBxxFo -T ${file} sftp://ftp.cluster011.ovh.net:22/home/funnymac/www/ftp/${folder}/${file}/ done #ok #find /Users/bruno/Pictures/_Canon/Export/2023/Janvier/ -type f | xargs -L 1 bash -c '/opt/homebrew/opt/curl/bin/curl --user funnymac:a3XELN4PHTYF9fFHtsY97eshXBxxFo -T $1 sftp://ftp.cluster011.ovh.net:22/home/funnymac/www/ftp/${1##*/}' \; # ok # /opt/homebrew/opt/curl/bin/curl -i -v --user funnymac:a3XELN4PHTYF9fFHtsY97eshXBxxFo -O sftp://ftp.cluster011.ovh.net:22/home/funnymac/8_2022.jpg # OK # /opt/homebrew/opt/curl/bin/curl --user funnymac:a3XELN4PHTYF9fFHtsY97eshXBxxFo -T '{2023-01-31_RuBlanc_0627,2023-01-31_RuBlanc_0623}.jpg' sftp://ftp.cluster011.ovh.net:22/home/funnymac/www/ftp/ \; # ok # find /Users/bruno/Desktop/Juin -type f | xargs -L 1 bash -c '/opt/homebrew/opt/curl/bin/curl --user funnymac:a3XELN4PHTYF9fFHtsY97eshXBxxFo --ftp-create-dirs --output-dir 'juin' -T $1 sftp://ftp.cluster011.ovh.net:22/home/funnymac/www/ftp/juin/${1##*/}' \;