Move file to destination if filename contains string
<p>I have a script that will move files from one place to another if it has a certain file extension.</p>

<pre><code>get-childitem -Recurse -path "S:\Vecta\Test\" | where {($_.extension -eq '.old')} | move-item -Destination "S:\Vecta\Archive"
</code></pre>

<p>Is there a way to modify this script so it looks for .old files with the word "AMA" contained in the filename? And moves the files to the destination path?</p>

<p>I've had a good search but all I can find is scripts that send a file to a destination based on the filename, not if it contains a specific word.</p>

<p>Many thanks,</p>