View Single Post
Old 07-23-2008   #1 (permalink)
gogram


 
 

Moving folders (including files) based to folder name

Hi,
I am trying to move some 2007 data which is stored in the following
folder naming format:
01-Aug-2007
to a central Archive2007 folder.
I have the following script:

dir "v:\UXP VRC" | Where-Object { $_.Name -like "*-*-2007" } | Move-
Item -Destination v:\Archive2007

but I get the following error when running the script:

WARNING: Access to the path 'V:\UXP VRC\11-Oct-2007' is denied.
(This appears for all folders)

I can drag and drop without any issues.
Thanks in advance.
Giles Ogram
My System SpecsSystem Spec