Maybe this is helpful. (For any reason I can't post this as code ... getting an "Access denied" everytime)
Regards
Andreas Baumgarten
(Please don't forget to Accept as answer if the reply is helpful)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Everyone,
I'm a beginner Powershell user. Could anyone help me to finish this script? I'd like to copy new files from "$a" to "$b"... automatically of course. How should I move on?
Thanks a lot.
Maybe this is helpful. (For any reason I can't post this as code ... getting an "Access denied" everytime)
Regards
Andreas Baumgarten
(Please don't forget to Accept as answer if the reply is helpful)
Hi, given that this post has been quiet for a while, this is a quick question and answer. Has your question been solved? If so, please mark it as an answer so that users with the same question can find and get help
With Powershell you can do everything, but robocopy.exe is insuperable for copying, synking also deleting!
This is the code, remove /L when you are sure...
/L : List only - don’t copy, timestamp or delete any files.
$Afolder = 'c:\user\Gab\desktop\A'
$Bfolder = 'c:\user\Gab\desktop\B'
Invoke-Command { robocopy.exe $afolder $Bfolder /L /s /w:0 /r:0 }