Link to home
Start Free TrialLog in
Avatar of janhoedt
janhoedt

asked on

Filesearch

Hi,

I need to filter out a directory for certain files and put these files into another directory to be able to search for a string in it. I tried textcrawler but it gets stuck since there are to many folders/files.

So what I would like to do is find a decent way to:
1.look for files with name x.config
2.grab them together and put them on another location, however, the folder in which they were should be displayed since all files are x.config and I need to make distinction between them
3.look for a string within these config-files and display this in a word/excel (this textcrawler can do fine)

Thanks for your input.
Avatar of Bill Prew
Bill Prew

Not sure exactly what you are after, but if you are just moving the files to search them, then why not do it all at once?  Perhaps something like:

findstr /S "searchstring" c:\base\x.config

~bp
But, if you really want to use textcrawler on an extract set of files, you should be able to use XCOPY, and do something like:

xcopy "c:\basedir\x.config" "d:\destdir" /S /I

~bp
Avatar of janhoedt

ASKER

Just a way to find web.config files in an IIS-directory. Because we need to scan the results (web.config) for a certain string (what can be done with textcrawler), I would like to copy all the web.configs into another location but there the folder should be created in which original folder it was (for example site1\web.config, site2\web.config etc.
Just a way to find web.config files in an IIS-directory. Because we need to scan the results (web.config) for a certain string (what can be done with textcrawler), I would like to copy all the web.configs into another location but there the folder should be created in which original folder it was (for example site1\web.config, site2\web.config etc.
Okay, xcopy with /S should preserve the folder structure.

~bp
I'd need only the top folder from which it is copied, now it copies the whole structure.
Can you provide an example?  Like if the source had:

c:\dir1\dir2\dir3\dir4\web.config

where do you want that file copied to?

~bp
Ok, this is an example:

c:\dir1\dir2\dir3\web.config

To

c:\temp\dir1\web.config
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!