Powershell Script to copy file to new folder
<p>I am fairly new to Powershell scripting and I have to write a script that copies a file from a certain path and pastes it in a new folder that is created with the current date. This is what I got so far.</p>

<pre><code>New-Item -Path "c:\users\random\desktop\((Get-Date).ToString('yyyy-MM-dd'))" -ItemType Directory

copy-item c:\users\random\desktop\rand.txt 'c:\users\random\desktop\((Get-Date).ToString('yyyy-MM-dd'))
</code></pre>

<p>When I run this script, it creates a directory called <code>((Get-Date).ToString('yyyy-MM-dd'))</code> instead of today's date. </p>

<p>When this script runs, it has to create a directory with the current date and paste that file in it. So if I were to run it once a day for 5 days, it should create 5 different folders with the file in each of them. Any help is much appreciated.</p>