Total N00b to Powershell and have already got a script that uses Robocopy to copy files and their directory structure to another folder, and a second that then copies them from the subfolders to the root folder. Yes, I've tried searching but can't find anything that helps.

This is the Powershell command for the second step:

get-childitem -rec -include *.* | copy-item -destination 'yourpath'

Is there anything I can add to this so that it doesn't copy files that already exist (according to filename) in the destination directory, ie the root of the folder structure?

Thanks in advance


Question: Preventing Superscript from being interpreted as Power when using Ctrl+^ shortcut?
Answer: When I asked people about this before, they wrote up: Displaying index as subscript on output: e.g. C[i] -&gt; C_i with Notation[...] or Interpretation[..]?  As with the other answers, this focuses on only output.  But uses an Interpretation instead of just changing the functions themselves.  You should just be able to copy/paste the code to try it out.  To change from subscripts to superscripts for your code, it should just be a copy/replace.

As for why you shouldn't use subscripts/superscripts, it took me a while to figure it out, but basically it is because $x_i$ is not a symbol.  Try to call FullForm on $x_i$ to get Subscript[x,i] which is tough to work with.