title: Hello do i'm trying to code a powershell script that upload and overwrite a folder to an other folder
body: <p>So I'm basically new to powershell coding and I don't really know if I'm doing this right - just started a few days ago.</p>
  
  <p>My main goal is to send a folder to a ftp server and overwrite the folder that's already on the server due to daily upload. Sorry but I'm a bit of a nerd and would like a few recommendations if I'm doing this well or not. Thank you </p>
  
  <p>I tried to code something using powershell and a batch file .
  And it actually work's but localy on my pc ( copy the folder and paste it in wanted folder) But it just won't work when trying to do this on a remote ftp server that's saved on my pc.</p>
  
  <p>script:</p>
  
  <pre><code>[string]$sourceDirectory  = "C:\test\*"
  [string]$destinationDirectory = "C:\Users\c0ld\Desktop/receive "
  Copy-item -Force -Recurse -Verbose $sourceDirectory -Destination $destinationDirectory
  exit
  </code></pre>
  
  <p>Bat script: </p>
  
  <pre><code>@ECHO OFF
  PowerShell.exe -Command "&amp; 'C:/test.ps1'"
  PAUSE
  </code></pre>
  
  <p>So this works when working on actual local folder, but when trying to do this on a network FTP folder it's actually not working.</p>