Discussion:
Trying to create a directory
Gianni Piccini
2014-01-04 14:47:57 UTC
Permalink
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?
Alexander Lukyanov
2014-06-06 16:27:44 UTC
Permalink
Git HEAD sources now contain mkdir -f option for quiet operation. Funny
that mkdirJob had already boolean quiet flag.
Post by Gianni Piccini
Hi to all. I would ask if there is a solution to my (mainly estethic)
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
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?
_______________________________________________
lftp mailing list
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
--
Alexander.
Loading...