Powershell / Upload-Sync-Script / FTP

Job ID: 33679240

Budget: €60 – €100 EUR

We need a Powershell Script that makes a file synchronization between a local network share and a remote ftps share.


example local network share:
\\fileserver\internal_documents\

example folder strucute on the network share:
internal_documents\ProductA
--internal_documents\ProductA\1.pdf
--internal_documents\ProductA\2.pdf
--internal_documents\ProductA\3.dxf
internal_documents\ProductB
--internal_documents\ProductB\A.pdf
--internal_documents\ProductB\B.pdf
internal_documents\ProductC
--internal_documents\ProductC\Z.pdf

remote ftp server path:
/public/files

The Variable-Parameters (network share, remote path, remote server ip, username, password) should be in a config-ini-file.


Addition requirements:

1. connect to the server and get a folder & filelist
then check if a folder or file doesn't exist anymore on the network share

if the ftp-server has a folder or file that doesnt exists on the local network share -> delete it on the ftp-side.
(note: in the folder can be 1 or more files or no file)

2. if on the local network share is a folder that doesnt exists on the ftp-side:
create the folder on the ftp

3.Upload the documents from the local network share folders:

on uploading - use the original filename and add a file extension ".tmp" to it ("1.pdf.tmp").
If the upload is completed, delete the MAY(!) existing file and rename 1.pdf.tmp to 1.pdf.

4. Make a logfile with the done actions in the sync-process (connection success or error message, started sync, deleted, created folders, uploaded documents, deleted or renamed documents, closing connection.)
(path of the logfile as parameter in the config-file)

5. all actions should write a output to the console gui and be documented in the logfile.
(output only if a flag is set for debug in the config-ini)