Solved

Need scripting help...ASAP

Posted on 2014-07-25
2
303 Views
Last Modified: 2014-07-25
Hello everyone, I am very inexperienced with powershell (but I LOVE it).  I have a txt filled with file names that i want to search a network drive for.  I also would love it to output a list of files that it finds on the network to a txt/csv to show a user how many files from their local computer are actually saved to the network.  I need to run it tonight, so I don't have time to fiddle with it to get it working.  I'm sure its a pretty easy one.  Can anyone lend me a hand?
0
Comment
Question by:r-dechristie
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 40220777
If I understand your requirement correctly then following code should work for you.. Replace \\Server\share with your share name and C:\Filenames.txt with your file with file names to search..
GCI \\Server\share -Include (GC C:\Filenames.txt) -Recurse | Select Fullname,LastWriteTime,Length,Name | Export-Csv C:\report.csv -nti

Open in new window

0
 

Author Comment

by:r-dechristie
ID: 40220789
Perfect!  Thanks so much.  I really need to find time to learn this great great tool!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hiding bulk external contacts 2 32
help with PowerShell script for registry permissions 8 49
xcopy loop 13 40
install .NET 3.5 on windows 10 13 45
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now