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
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
mkdircreate the remote folder if not exist (or also if exist) and send the file one by one per times via
putcommand in that folder.
- by synchronizing my whole
FOLDERwith remote root folder with command
The second is the faster I think and I've tried to do that with below scripts and something went wrong.