Upload a file to sftp and create the path
Hello,
nice to be a new member!
I need to synchronize a local folder with remote SFTP folder.
I have two way to do that and I think the first is the best.
My folder tree have a complete
the folder names are
I think that I've 2 ways to do that:
The second is the faster I think and I've tried to do that with below scripts and something went wrong.
nice to be a new member!
I need to synchronize a local folder with remote SFTP folder.
I have two way to do that and I think the first is the best.
My folder tree have a complete
FOLDER
in my local PC with inside several paths
FOLDER\2022\1 FOLDER\2022\2 ... FOLDER\2022\12 FOLDER\2023\1
YEAR
and MONTH
and inside year there are only 12 folders as months and inside months several files, .csv files
I think that I've 2 ways to do that:
- by create the remote path folder tree based in the actual year actual month. Get the actual date and create path by
mkdir
create the remote folder if not exist (or also if exist) and send the file one by one per times viaput
command in that folder.
- by synchronizing my whole
FOLDER
with remote root folder with commandsynchronize remote
.
The second is the faster I think and I've tried to do that with below scripts and something went wrong.