title: How to move folder and its content in powershell
body: <p>I am trying to move one folder and its content from 1 location to another.
  Name of the folder is c:\logfiles and it has sub folders and text files, but the script which i have written, it only moves the content of logfiles but i want to move logfiles folder as a whole to a new location</p>
  
  <pre><code>$current_logfiles = 'C:/LogFiles/*'
  $new_logfiles = 'C:\My_Project\LogFiles\'
  
  if (!(Test-Path -path $new_logfiles  )) {
  New-Item $new_logfiles -type directory
  
  Move-Item  -Path  $current_logfiles  -Destination $ $new_logfiles -Recurse -force
  </code></pre>
  
  <p>}</p>