Gianni Piccini
2014-01-04 14:47:57 UTC
Hi to all. I would ask if there is a solution to my (mainly estethic)
problem. I use lftp launching it with a script in parameters:
lftp -f script.txt
I need to upload some files in a server that has many files e
directories (so, a complete mirror is not good due the needed time), and
I compose the script in this way:
open -u myuser,mypass ftp.mysite.com
mkdir -p /www/dir1
put -a -c -O /www/dir2 /home/me/upload/index.txt
mkdir -p /www/dir2
put -c -O /www/dir2 /home/me/upload/image.jpg
quit
Sometimes files are not present in the server, or directory could not
exist, so, if overwriting with new files is handled by switch -c, I've
put the command mkdir -p before upload, but, that's my question, there
is any way to silently create the directory or try to create it only if
not exists, or avoiding error messages if it is already present?
problem. I use lftp launching it with a script in parameters:
lftp -f script.txt
I need to upload some files in a server that has many files e
directories (so, a complete mirror is not good due the needed time), and
I compose the script in this way:
open -u myuser,mypass ftp.mysite.com
mkdir -p /www/dir1
put -a -c -O /www/dir2 /home/me/upload/index.txt
mkdir -p /www/dir2
put -c -O /www/dir2 /home/me/upload/image.jpg
quit
Sometimes files are not present in the server, or directory could not
exist, so, if overwriting with new files is handled by switch -c, I've
put the command mkdir -p before upload, but, that's my question, there
is any way to silently create the directory or try to create it only if
not exists, or avoiding error messages if it is already present?