|
Re: Help a newbie On May 16, 3:37 pm, "Keith Hill [MVP]"
<r_keith_h...@no.spam.thank.u.hotmail.com> wrote:
> "brhessel" <brianhessel...@gmail.com> wrote in message
>
> news:1179343841.544924.165940@k79g2000hse.googlegroups.com...
>
>
>
> > Ok so I am up to:
>
> > get-ChildItem -recurse -include a_*.nsf |Select-Object
> > Name,FullName,Length,LastAccessTime |export-Csv -path C:\archives.csv
>
> > How do I convert the Length into MB before exporting it?
>
> get-ChildItem -recurse -include a_*.nsf |Select-Object
> Name,FullName,@{n='Length';e={$_.Length/1MB}},LastAccessTime
> |export-Csv -path C:\archives.csv
>
> Note that Select-Object and a number of other cmdlets allow you to use a
> hashtable to specify the name and value for a computed property.
>
> --
> Keith
Thanks Keith. I now have approval to move these files from there old
location to a temporary one before deleting them. Since I have the
results in a CSV file would it be easier to retrieve the path from
there and use it to move them or should I modify my find script to
move what it finds? I would think it would be easier to use the find
script but quicker to use the CSV since it won't have to search for
the files again. Thoughts? any examples would be great help also. |