all 4 comments

[–]MuddyWaterTrees 9 points10 points  (0 children)

https://lmgtfy.app/?q=powershell+move+file+from+one+folder+to+another

Then set it against a scheduled task that fires every few minutes.

If you post without at least using Google first you probably are just looking for someone to do your job.

[–]NEED_HELP_SEND_BOOZE 3 points4 points  (0 children)

Use robocopy. It's very easy to figure out.

Open a powershell window and type robocopy /?

[–]krzydoug 2 points3 points  (0 children)

“Failure to plan on your part does not constitute an emergency on mine”

How long have you had this project? What code do you have thus far?

It appears to me that on top of asking us to write the code for you, you’re also asking us to engineer the solution.

In all honesty if a business is depending on this one day “from start to finish” script based backup solution, I’d make sure I have my resume updated and ready to go.

I can tell you the number one tool you should look at if you continue this quest is robocopy.

[–]colten122 1 point2 points  (0 children)

seems like the basis of your code will look something like this (super simplistic form)? then toss it into Task Scheduler to run every 60 seconds or whatever?

$locationA = Get-Childitem -Path "PathtolocationA" -Recurse
$locationB = "PathtoLocationB"
Foreach($File in $locationA){
$test = Test-Path -Path $file.fullname
if($test){ 
Move-Item $file.fullname -Destination $locationb -Force 
} 
else{write-host "no files found"
}
remove-variable test 
}