[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Looking for a search and copy util

Posted on 2006-05-03
22
Medium Priority
?
428 Views
Last Modified: 2009-12-16
I need to search our file system within files for a keyword. I then need to copy the results to another location retaining the directory structure. I cannot seem to find a simple little app that does just that.
0
Comment
Question by:JPuma
  • 7
  • 7
  • 6
  • +1
21 Comments
 
LVL 7

Accepted Solution

by:
Clever_Bob earned 498 total points
ID: 16601342
Perhaps I have got the wrong end of the stick buit Windows Explorer takes care of this for you (All Operating Systems since Win 98 I think from memory)

If you open any folder in Windows and click 'search'

- click 'all files and folders'
- select 'a word or phrase in this file'

copy and paste the search results to another location.

I hope this helps.
0
 

Author Comment

by:JPuma
ID: 16601382
you missed retaining the directory structure.
0
 
LVL 4

Assisted Solution

by:jrs_50
jrs_50 earned 501 total points
ID: 16601389
You probably won't.  It's doable but not 'simple'.  You didn't even mention what operating system.  That makes a huge difference.  Basically; I think it would call for a script that could handle the search AND subsequently the copy.  The apparent need to maintain directory structure complicates the situation further. For example; would you want ALL files within that structure or the structure with only those files that meet the search criteria?

Overall; someone MIGHT provide a 'solution' but generally speaking that would be beyond the type of 'free' answers that you find here.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:JPuma
ID: 16601403
An app must exist. I understant the concept and knew if I can program this would not be an issue. Just looking for that magical response with a program name.

Anyone??
0
 
LVL 4

Expert Comment

by:jrs_50
ID: 16601612
It's POSSIBLE that someone MAY have done it for your particular OS, disk/file structure, etcetera AND be willing to share for FREE.  Best of luck.  
0
 
LVL 7

Expert Comment

by:Visual3DMaya
ID: 16603974
jrs_50 could you make me comprehend what Puma wants to retain:
"I then need to copy the results to another location retaining the directory structure."?
0
 
LVL 4

Expert Comment

by:jrs_50
ID: 16604685
Clever_Bob is, essentially correct presuming windows (although whether, or not, windows is still unclear as are file types to include and whether, if windows, indexing is used or not).  The 'search' could be automated via scripting in virtually any OS but the commands to do so differ.  The same is true regarding 'copy'.  Retaining the directory structure is also possible, but slightly more problematic in that the initial path, apparently, has to be derived from the results of the initial search and the corresponding path needs to, or MAY need to, be recreated for the copy target.  Again the OS, and an understanding of available utilities/commands makes a difference.

Visual...   If I comprehend correctly; presume a keyword search for "thisfile".  Presume further that files (of ANY type) containing that keyword are contained in /dir1/dir2/dir3 and also in /dir1/dirA and also in /dirX  then the copy would result in /dir1/dir2/dir3/filename, /dir1/dirA/filename and /dirX/filename.

As I said before; it is possible that there's a code snippet/utility available somewhere that is specific to the need but, without even having the OS info, finding it is unlikely.  There are also other possibilities given the numerous commands/utilities bundled into the OS's.  But; I don't know which OS(s), filesystem(s), filetype(s), shell(s), language(s), whether the target path(s) pre-exist...

I also don't have any examples at-hand and don't feel up to doing it from scratch.  It could be a search on EE for "copy files" or "filecopy" or the like would yield the code.  I don't feel up to doing that search either.

Good luck.
0
 
LVL 7

Assisted Solution

by:Visual3DMaya
Visual3DMaya earned 501 total points
ID: 16604994
Thanks jrs_50 and bingo:
Search and Replace is the program http://www.funduc.com/search_replace.htm it is one of my favorites.
Search and Replace is for Windows 95/98/ME, NT/2000/XP, Windows 2003.
My Tips:
-let Search for blank
-under File Mask write like this: *thisfile*
-at Path give the search path
When is ready, the results including paths can be saved in text mode, even .html.
0
 

Author Comment

by:JPuma
ID: 16605235
To answer some questions here. I need it for Windows OS, 2000 Server specifically. This is for a legal matter at work. I need to provide a copt of our documents that contain a certain word in the file to our lawyers. The files need to be in the same directory from which they came. I only want the files that meet the search criteria.

0
 
LVL 7

Expert Comment

by:Visual3DMaya
ID: 16605597
Search and Replace is for Windows OS, 2000 Server, also. It is legally to use: http://www.funduc.com/srquestions.htm
You didn't tell you need a free app, anyway you won't find anything else so good like it. If i new something free i had told you.
For sure you won't find something like it as it can also search through formatted documents for a certain word or any other combination. Only, you must place the word in the Search for field and File Mask need to stay blank. Also can search into archives.
You can copy the files that meet the search criteria in the clipboard and paste where you need or
you can make scripts to automate your work. Make a script for every folder that you want and you can make it to save in that folder.
0
 

Author Comment

by:JPuma
ID: 16605695
I dont want free, who said that?? I dont care if the program costs money, just need something simple, point an click...you know. I am looking at that search and replace app, I guess I could come up with something to make it work but this is an urgent matter and it needs to get done today. I dont have time to deal with scripts and the like.  Still looking for that magical answer. I found programs that do filename searchs and can then copy the results along with directory locations to another place.

0
 
LVL 4

Expert Comment

by:jrs_50
ID: 16605780
Visual...  Looks like it might do the job and then some although in reading the base description I'm not certain about the copy while retaining initial directory structure.  Recall: this is not so much search and replace as it is find and copy w/initial structure.

JPuma... Define 'documents'.  Are you talking about strictly .doc or including .txt .htm .rtf  and/or what? E-mail?  Are they raw or zipped/compressed or both?  Include/exclude metadata?   You might want to look at the product Visual suggested, or use that product name in a google to find out what else shows up in ads/links.  You might also consider re-asking this question under the 'programming' category.  Someone might have an applicable script that they are willing to share.  If you DO reask - check with the moderators first regarding how to do that 'correctly' so that only one real thread exists.
0
 

Author Comment

by:JPuma
ID: 16605858
I am search for all MS Office docs, ppt, doc, xls....and also PDF. There may be ZIP's in these directorys. Basically whatever the text search could find in any file type will do.
0
 
LVL 4

Expert Comment

by:jrs_50
ID: 16605872
"I found programs that do filename searchs and can then copy the results along with directory locations to another place. " 

The 'trick' essentially is finding the files by CONTENT and then passing each found file name to one of those programs you found so that those programs can find by NAME and COPY including applicable paths.

Try 'programming' category. I'm certain its been done (have done it myself).  I just don't have any copies of it handy and don't want to spend the time scripting.  Someone else may be able to simply 'paste' the script code if they have it handy or point you to an example.

Good luck.
0
 
LVL 4

Expert Comment

by:jrs_50
ID: 16605936
If you have a search program on w2k, or use a program such as Visual suggested, that can create a text file containing the filepath and filename you can then use that text file via redirection to feed the paths/names to one of the findfile+copy w/dir programs that you found.
0
 
LVL 7

Expert Comment

by:Visual3DMaya
ID: 16605961
I found programs that do filename searchs and can then copy the results along with directory locations to another place.
>>>i took a look at view/script/advanced, pressed options, Output/Write output to/here select one of the search folders.
Even can append to that file on the next search.
You just need to set just the search string and nothing else, even if it is so complex. After that press Add. Save as the script in the folder you need to search. After that just press the script and will do the rest.

You won't find many programs to search through formatted text. What type of documents are you searching?

If you need real time tips, try contact me on mess.
0
 
LVL 7

Expert Comment

by:Visual3DMaya
ID: 16606135
jrs_50, i said: "When is ready, the results including paths can be saved in text mode, even .html."
It is for sure the program that he needs, only to test the script (if need automate). I looked on it and seems to work as Puma needs.
More over, it search many formats, usually what you find search only text.
0
 
LVL 4

Expert Comment

by:jrs_50
ID: 16609493
Visual...  I agree that the product you pointed to, based upon your description, would probably fit into what JPuma was attempting to do.  I think you did a good job pointing him there - particularly given the limited information provided in his initial request.  I also think it would have been easier for him to use than the 'search' capabilities within his MS Win 2000 which might not yield what he was expecting without some property modifications.

Seems to me that funduc either by itself, or with one of the programs JPuma indicated that he'd found, would be the 'correct' answer to his request.  

My idea in sending him to 'programming' was that there was a good liklihood that someone there could help him merge the found content and file copy pieces.  If you see my earlier post I did mention that the product you indicated could be used.

I, personally, think that you should get 'points'.

0
 
LVL 7

Expert Comment

by:Visual3DMaya
ID: 16612410
"If you see my earlier post I did mention that the product you indicated could be used.
I, personally, think that you should get 'points'."
I have seen that before, jrs_50, it's ok.

I'm sorry Puma, you took it too personally, jrs_50 wanted just to assure ME that for him my answer looked ok.
And you told me that comunist words, like i have got to work for free :)
"Is this why you guys put so much effort into responding?? Neither solution is the answer in my opinion and I would like to withdraw this question since I wasnt able to get an answer"
Just for points my answer would have been for sure shorter.
Regarding to withdraw the question, i have been done the same, only the rule here as i know is to expose the reason and answer every EE question.

It's an enigma for me why Puma don't say clear what's the problem with Search and Replace so we can continue. I know another one that could meet your needs, also scripts that know different formats. What you said until now you Puma need, Search and Replace did to me.
You made me courious and made some scripts:
The result file looks like this: (searching after "Lite-on also said it will follow up")

Processing file : F:\TOP\DVD-CD-Writer\Lite-on ships 'fastest' DVD rewriter  The Register.mht
Line 346 -       <P><Lite-on also said it will follow up> today's launch with an =
Found 1 occurrences.
Searched 3 file(s), found 1 occurrences in 1 file(s)
Lite-on also said it will follow up - Searched 3 file(s), found 1 occurrences in 1 file(s)

I really trust you when you said it don't meet just half of your needs, but it's evident you must expand the answer, even if you are an Director.
I and one of my friends tested Search and Replace for years and chose it from many others because of its speed and user interface among others. Both of us work with large amount of data or databases.
0
 
LVL 7

Expert Comment

by:Visual3DMaya
ID: 16616054
I like to post here for the following reasons:
1. i learn something
2. i get points and i feel better
3. i help people
From Puma's comments "needed an easier solution based on the time I had" i can not learn anything, i can not help him and i don't feel better.
I'd feel better if you would tell us your solution pls.
After that i'd be happy to Leave a request in the Community Support topic area for a refund to close the question.
The rulls here as i said before are:
Before requesting a deletion or refund, make sure you have responded to all the expert comments. If you have found the answer yourself, please provide a detailed solution in the question.
0
 

Author Comment

by:JPuma
ID: 16617660
Visual, to let YOU know what I used check here.... http://www.dtsearch.com/ 

I hope this puts you at ease, I really needed a tool that was very flexible. We often need to do this type of work here and combining apps and scripts or whatever is just not suitable. I am happy to give you the points, at this point I really dont care and I didnt come here for all this nonsense. And I dont care if I conform to anyones ideals, I wasnt here to make friends with people, just used this as a tool to query information, unfortunetly I only got back noise. Hopefully my subscription will be worth something next time around.

Mods, if youre paying attention should I just Accept one of Visuals comments, or can you do take over from here?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Web hosting control panels were first developed to make it faster and easier for most users to set up and operate websites. The graphical user interface (GUI) allows users to perform tasks by pointing and clicking rather than typing highly specific…
Today as you open your Outlook, you witness an error message: “Outlook is using an old copy of your Outlook Data File…”. Probably, Outlook is accessing an old OST file.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

834 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