Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am new to this. Is there any script that analyzes and creates an XML files the entire file structure of any external hard drive that is connected to the computer,including all the fill names in all the folders.And i want to store the xml document to the computer even after removing the hard drive. Can anyone help me by giving an idea or a tutorial or link which will me?

Thank you

share|improve this question
1  
If I understand you correctly you want to create an XML file listing all directories and files of a drive, right? Might be tricky in Apple Script. What do you need the file for, there might be other means (e.g. find /Volumes/THEDRIVE -print > /tmp/allfiles.txt). –  patrix Dec 8 '11 at 9:33
    
@patrix what u understood was right. What can i do for these? Can you help me? –  Anjali Dec 8 '11 at 9:43
    
@patrix And i want to store the xml document to the computer even after removing the hard drive. –  Anjali Dec 8 '11 at 9:47
    
@patrix To search all the content of all external drives which have been analyzed without having to connect them and search them one by one. –  Anjali Dec 8 '11 at 9:51
    
@patrix It is possible to browse a graphic representation of the XML document information, much in the same way we browse in the finder? –  Anjali Dec 8 '11 at 10:19
add comment

2 Answers

Based on the clarifications in the comments, you can do the following:

Create an index file

find /Volumes/YOUR-EXTERNAL-DRIVE -print > ~/YOUR-EXTERNAL-DRIVE-index.txt

This will list all files/folders on the external drive and store the result in your home folder.

Search for a file

grep THE-NAME-YOU-ARE-LOOKING-FOR ~/YOUR-EXTERNAL-DRIVE-index.txt

Partial names will work as well (and the external drive must not be attached for the search).

share|improve this answer
    
It is possible to browse a graphic representation of the XML document information, much in the same way we browse in the finder? –  Anjali Dec 8 '11 at 10:15
    
There isn't even an XML document involved in this solution :). For GUI-based browsing you may need additional software (but I don't know whether this exists or would need to be developed). –  patrix Dec 8 '11 at 10:26
add comment

There is at least two apps out there which provide the required functionality as well:

Archive 7

Archive catalogs the content of your removable media and devices such as CDs, DVDs, Flash Memory Drives, HDs, etc. so you can quickly find the information you are looking for even when those devices are no longer connected to your Mac.

NeoFinder

NeoFinder (formerly known as CDFinder) rapidly catalogs your entire disk and media library, and backup archive. NeoFinder keeps track of your documents, photos, songs, movies, and folders wherever they are stored.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.