Need help for simple powershell script

Hello,

I am, at maximum, a computer “power user” if you want to call it like that, but not a “coder”, so the thing I am trying to do via powershell is above my skills. I need your help, and would so much appreciate it. The thing is:

I have two Synology NAS that are synced via a Synology Tool. The sync has to be done with this Synology on board app. The Sync works perfect. But: I would like to have an indicator whenever a project folder is fully synced. I show you the folder structure:

  • MAINFOLDER
    – Project 1-Folder
    ----- File1, File2, File3, etc
    – Project 2-Folder
    ----- File1, File2, File3, etc
    – Project 3-Folder
    ----- File1, File2, File3, etc

The Mainfolder is synced from one NAS to the other. What I am trying to do:

Search in Mainfolder on source NAS. If there is a “Project” folder, check its content and compare it to the same project folder on the target NAS. Comparing should be for example:

  • Filename
  • File size

That would be enough.
(checking file-content, like hash values would take too much time as the files are very big, and is not necessary)

This check should be done for example every 30 minutes.

GOAL
The goal would be: If the content of one project folder is (still) different from source to target: Do nothing.
But, if it is the same: write a text-file in that project folder, named “sync-finish.txt” for example.

That’s it :upside_down_face:

I already took google to find commands like “compare” in powershell, but with my skills I have no chance to create a script doing what I want.

I really would need help and would so so much apprechiate it.

Kind regards

Peter

Pragomer,
Welcome to the forum. :wave:t3:

What kind of help do you need? You did not ask any question.

So you should not look for commands you should try to find scripts you can adapt to your particular needs.

https://www.google.com/search?q=powershell+compare+folder

Please keep in mind … this forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

We expect you to make an own attempt to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further.