File type search

Hi,
I have list of all the InetAddress attached to the LAN. I want to search particular file types in a system using its InetAddress. (InetAddress is nothing but IP address) Using that i want to search mp3 , jpeg etc files are in the system. Can any one help me..
regards,
prakash

Thanks, that's much better. However I only find 21 files with this setting, but I know that there are at least 50 in my Home directory. Any idea why? Is there like a time limit as it seems that its mostly older files that are ignored.

Similar Messages

  • File Server - File size\type search and save results to file

    I already have a vb script to do what I want on our file server, but it is very inefficient and slow.  I was thinking that a powershell script may be more suitable now but I don't know anything about scripting in PS.  So far the vb code that I
    have works, and I am not the one who wrote it but I can manipulate it to do what I want it to.  The only problem is, when I scan the shared network locations it stops on some files that are password protected and I don't know how to get around it.  If
    someone else knows of a PS script to go through the file system and get all files of a certain type or size (right now, preferably size) and save the file name, size, path, owner and dates created\modified please point me to it and I can work with that.  If
    not, could I get some help with the current script that I have to somehow get around the password protected files?  They belong in a users' HOME directory so I can't do anything with them.  Here is my code:   
    'Script for scanning file folders for certain types of files and those of a certain size of larger'
    'Note: Script must be placed locally on whichever machine the script is running on'
    '***********VARIABLES FOR USE IN SCRIPT***********'
    'objStartFolder - notes the location of the folder you wish to begin your scan in'
    objStartFolder = "\\FileServer\DriveLetter\SharedFolder"
    'excelFileName - notes the location where you want the output spreadsheet to be saved to'
    excelFileName = "c:\temp\Results_Shared.xls"
    '**********END OF VARIABLES**********'
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    fileName = objFSO.GetFileName(path)
    'beginning row and column for actual data (not headers)'
    excelRow = 3
    excelCol = 1
    'Create Excel Spreadsheet'
    Set objExcel = CreateObject("Excel.Application")
    Set objWorkbook = objExcel.Workbooks.Add()
    CreateExcelHeaders()
    'Loop to go through original folder'
    Set objFolder = objFSO.GetFolder(objStartFolder)
    Set colFiles = objFolder.Files
    For Each objFile in colFiles
    Call Output(excelRow) 'If a subfolder is met, output procedure recursively called'
    Next
    ShowSubfolders objFSO.GetFolder(objStartFolder)
    'Autofit the spreadsheet columns'
    ExcelAutofit()
    'Save Spreadsheet'
    objWorkbook.SaveAs(excelFileName)
    objExcel.Quit
    '*****END OF MAIN SCRIPT*****'
    '*****BEGIN PROCEDURES*****'
    Sub ShowSubFolders(Folder)
    'Loop to go through each subfolder'
    For Each Subfolder in Folder.SubFolders
    Set objFolder = objFSO.GetFolder(Subfolder.Path)
    Set colFiles = objFolder.Files
    For Each objFile in colFiles
    Call Output(excelRow)
    Next
    ShowSubFolders Subfolder
    Next
    End Sub
    Sub Output(excelRow)
    'convert filesize to readable format (MB)'
    fileSize = objFile.Size/1048576
    fileSize = FormatNumber(fileSize, 2)
    'list of file extensions currently automatically included in spreadsheet report:'
    '.wav, .mp3, .mpeg, .avi, .aac, .m4a, .m4p, .mov, .qt, .qtm'
    If fileSize > 100 then'OR objFile.Type="Movie Clip" OR objFile.Type="MP3 Format Sound" _ '
    'OR objFile.Type="MOV File" OR objFile.Type="M4P File" _'
    'OR objFile.Type="M4A File" OR objFile.Type="Video Clip" _'
    'OR objFile.Type="AAC File" OR objFile.Type="Wave Sound" _'
    'OR objFile.Type="QT File" OR objFile.Type="QTM File"'
    'export data to Excel'
    objExcel.Visible = True
    objExcel.Cells(excelRow,1).Value = objFile.Name
    objExcel.Cells(excelRow,2).Value = objFile.Type
    objExcel.Cells(excelRow,3).Value = fileSize & " MB"
    objExcel.Cells(excelRow,4).Value = FindOwner(objFile.Path)
    objExcel.Cells(excelRow,5).Value = objFile.Path
    objExcel.Cells(excelRow,6).Value = objFile.DateCreated
    objExcel.Cells(excelRow,7).Value = objFile.DateLastAccessed
    excelRow = excelRow + 1 'Used to move active cell for data input'
    end if
    End Sub
    'Procedure used to find the owner of a file'
    Function FindOwner(FName)
    On Error Resume Next
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery _
    ("ASSOCIATORS OF {Win32_LogicalFileSecuritySetting='" & FName & "'}" _
    & " WHERE AssocClass=Win32_LogicalFileOwner ResultRole=Owner")
    For Each objItem in colItems
    FindOwner = objItem.AccountName
    Next
    End Function
    Sub CreateExcelHeaders
    'create headers for spreadsheet'
    Set objRange = objExcel.Range("A1","G1")
    objRange.Font.Bold = true
    objExcel.Cells(1, 1).Value = "File Name"
    objExcel.Cells(1, 2).Value = "File Type"
    objExcel.Cells(1, 3).Value = "Size"
    objExcel.Cells(1, 4).Value = "Owner"
    objExcel.Cells(1, 5).Value = "Path"
    objExcel.Cells(1, 6).Value = "Date Created"
    objExcel.Cells(1, 7).Value = "Date Modified"
    End Sub
    Sub ExcelAutofit
    'autofit cells'
    Set objRange = objExcel.Range("A1")
    objRange.Activate
    Set objRange = objExcel.ActiveCell.EntireColumn
    objRange.Autofit()
    Set objRange = objExcel.Range("B1")
    objRange.Activate
    Set objRange = objExcel.ActiveCell.EntireColumn
    objRange.Autofit()
    Set objRange = objExcel.Range("C1")
    objRange.Activate
    Set objRange = objExcel.ActiveCell.EntireColumn
    objRange.Autofit()
    Set objRange = objExcel.Range("D1")
    objRange.Activate
    Set objRange = objExcel.ActiveCell.EntireColumn
    objRange.Autofit()
    Set objRange = objExcel.Range("E1")
    objRange.Activate
    Set objRange = objExcel.ActiveCell.EntireColumn
    objRange.Autofit()
    Set objRange = objExcel.Range("F1")
    objRange.Activate
    Set objRange = objExcel.ActiveCell.EntireColumn
    objRange.Autofit()
    Set objRange = objExcel.Range("G1")
    objRange.Activate
    Set objRange = objExcel.ActiveCell.EntireColumn
    objRange.Autofit()
    End Sub
    David Hood

    Accessing Excel through automation is bvery slow no matter what tool you use.  Scanning a disk is very slow for all tools.
    Since Vista all system have a search service that catalogues all major file itmes like size, extension, name and other attributes.  A search of a 1+Tb  volume can return in less that a second if you query the search service.
    You can easily batch the result into Excel by writ4ing to a CSV and opening in Excel. Use a template to apply formats.
    Example.  See how fast this returns results.
    #The following will find all log files in a system that are larger than 10Mb
    $query="SELECT System.ItemName, system.ItemPathDisplay, System.ItemTypeText,System.Size,System.ItemType FROM SystemIndex where system.itemtype='.log' AND system.size > $(10Mb)"
    $conn=New-Object -ComObject adodb.connection
    $conn.open('Provider=Search.CollatorDSO;Extended Properties="Application=Windows";')
    $rs=New-Object -ComObject adodb.recordset
    $rs.open($query, $conn)
    do{
    $p=[ordered]@{
    Name = $rs.Fields.Item('System.ItemName').Value
    Type = $rs.Fields.Item('System.ITemType').Value
    Size = $rs.Fields.Item('System.Size').Value
    New-Object PsObject -Property $p
    $rs.MoveNext()
    }Until($rs.EOF)
    ¯\_(ツ)_/¯

  • File type in Spotlight and Finder search

    I have several lectures that are all Keynote presentations (both 08 and 09) and wanted to make a smart folder to have them all in one place. However, doing that, I realized that my Keynote files are not listed as "Presentations" but rather as "Documents", along with my Pages documents and many other files, including images and music files. Actually, almost every file type is listed in the Documents category. Is there a way to manage these File Types? Searching by extensions does not seem to do the trick.
    Very confused.

    Thanks, that's much better. However I only find 21 files with this setting, but I know that there are at least 50 in my Home directory. Any idea why? Is there like a time limit as it seems that its mostly older files that are ignored.

  • How to search unknown file types?

    Is it possible to get DW CS3 to search the contents of files
    that it doesn't recognise?
    I'm working on a C# .net 2 site (I prefer editing in DW than
    VS), which includes .resx files. I have the files within a DW site,
    yet searching for strings I know exist in selected files yields no
    results. However, opening them in DW, and then searching content
    does return a result. But this isn't very helpful when you don't
    know what file you're looking for!
    So, is it possible?
    Thanks
    Matt

    I'm using 902.
    The custom xml item type is something that was created by Oracle Netherlands. They based it on the File type. We input items of this type using XOpus, which is a javascript based XML editor that is embedded within the browser, so when we click on the portal link to edit the item, xopus renders the xml content, and we make changes or enter data and save it.
    This shouldn't matter though. The XML items are definitely being added to the database, because they are accessible later, but these items never show up in the search results for items (whereas items of builtin types, file or text, do show up). Whether this is because they aren't being indexed, or for some other reason, I'm not sure.
    thanks for your help...

  • Reading shape file and searching by file type

    I want to write an application for working with ESRI .shp files which I think shouldn't be too hard. Looking for recources on this forum I didn't find any at all, which is unusual to me.
    It made me wonder the following: Why can't I search for resources on ni.com by file type? I see a lot of applications that interact in some way with existing file types (beyond ordinary xls, doc and txt), but information (be it articles, links or forum questions) are spread out all over the web (if the information exists at all). I would love to see recources grouped by file type, so I can see in a list of extensions which types people program for(in labview). Maybe there's allready something like this that I am not aware of?

    We don't have a way to search content by file type. And since most attachments are zipped up by NI or by customers, searching for a filetype probably wouldn't yield the results you were looking for.
    If an article (or customer question) makes a reference to that filetype in the text itself, or includes a link to such a file, the file extension will be indexed.
    I don't see any content relating to ".shp" files, so I would recommend simply posting your request to the appropriate product category in the Forums.
    Best of luck with the application.
    -Carrie Hooper
    National Instruments
    Web Support & Operations

  • Spotlight/Finder Doesn't Search In ASP and other file types?

    .asp and .c file types are nothing more than .txt files with different extentions..
    Am I correct in thinking that Spotlight doesn't search inside these files? I have a folder full of asp files and spotlight doesn't seem to find anything when I type text that I know is inside one (as a test)
    It does appear to search INSIDE .html files in the same folder.. Can you add different file extentions that spotlight will search into?
    If not, then "Spotlight" is much ado about nothing as google desktop search, X1 and the msn desktop search (Windows) released years ago search inside ALL files..
    Signed,
    Curious Switcher
    Wayne Bienek
    Mac Pro 3Ghz / 4GB Ram Mac OS X (10.4.8) 30" Cinema Display + 20 " Cinema Display

    Spotlight makes a content index for files using mdimporter, and that process depends on mdimporter modules for the specific file type. Thus in /Library/Spotlight you will see a collection, such as Microsoft Office.mdimporter, of "extras" for special file types. There are also the built-in ones in /System/Library/Spotlight. If you installed Xcode/Developer Tools, there should be a SourceCode.mdimporter, which I imagine would index the asp and c files. If not, some people have modified it to also index php files, see this discussion:
    http://www.macosxhints.com/article.php?story=20050514182520714&query=spotlight%2 Bphp%2Bfiles
    at MacOSXHints. I think you could do something similar (at your own risk of course) for other pure text based files. Be sure to expand the the replies and read them.
    Francine
    Francine
    Schwieder

  • Search Results Weight By File Type?

    We are crawling a series of folders using the NT CWS. Some folders contain primarily HTML content while others contain binaries (PDF, DOCs). The folders are split into "Web Content" and "Publications" at the root -- so they are already segregated by file type. Because the binary documents are relatively large and contain a lot of text (meeting minutes, etc), they seem to rise to the top of many search queries. Not sure if the search engine is simply counting the number of term matches or using some other algorithm for relevance. I've fiddled with the Search Results Manager - Banner Fields weights without much success.
    Can anyone recommend a strategy that will weight our HTML documents higher than PDF/DOC files? I know through the Search API, we can restrict search to particular folders but that is different than actually affecting the weighting. Ideally, want to show any HTML docs and then show binary docs, below.

    Bring up the search HUD, use the "+" drop down menu to add an "other metadata" criteria choose file name and type in the extension that you are looking for.
    RB

  • When doing a  Command+F search, can I EXCLUDE file types?

    I need to find a logo called "5 Star". I know it is either a tiff or eps file.
    I search brings 3000+ items.
    Most of these are internet cache files, fonts and PDF files.
    Can I EXCLUDE a file type when I do a command+F?
    What happened to the "IS NOT" paramater in the find?
    I see Name;
    Is
    Starts With
    Ends With
    Contains

    Yes. If you use "Apple Command -f" , you can specify all sorts of search parameters (see OTHER) in an exclusive manner. You can only use the parameter choices which are provided, but for example, you can use "NAME + contains" "star" with KIND as "other" and specify "eps." or ".tif." Or use NAME + ends with ".eps."
    I am not sure where the exclusion AND NOT feature went. Each list of possibilities is associated with the pre-canned options.

  • Searching for source in unrecognized file types

    Using DW CS5, I'm unable to find text while searching that is in some of my files. I think this might be because these files are not recognized as source code by Dreamweaver. They are PHP files but they have the extension .ctp instead (because they are Cake files).
    Is there any way to get Dreamweaver to consider these files when searching? I have already specified that Dreamweaver should be used to edit these files in Preferences -> File Types / Editors.
    Thanks,
    Stephen

    Stephen,
    Using DW CS5, I'm unable to find text while searching that is in some of my files. I think this might be because these files are not recognized as source code by Dreamweaver. They are PHP files but they have the extension .ctp instead (because they are Cake files).
    Is there any way to get Dreamweaver to consider these files when searching? I have already specified that Dreamweaver should be used to edit these files in Preferences -> File Types / Editors.
    Yes. This TechNote explains it:
    http://kb2.adobe.com/cps/164/tn_16410.html
    Randy

  • My mac says that it has 40 gb of movies on it but when i finder search for file size, and for file type it gives me no videos

    My mac says that it has 40 gb of movies on it but when i finder search for file size, and for file type it gives me no videos or movies. I have called apple 3 times and each time they do the same thing and then do something that takes awhile to finish so we hang up and then it never works.
    Please Help

    each time they do the same thing
    And what thing might that be?

  • Search or sort by file type?

    has anybody figured out how to search/sort by file type (.psd, .cr2, Etc.)?
    I've been looking, but I can't find it.

    Bring up the search HUD, use the "+" drop down menu to add an "other metadata" criteria choose file name and type in the extension that you are looking for.
    RB

  • Can I only search for specific file types?

    Oftentimes I need to pickup just the InDesign file. I sort by type but there are word docs, images (lots of them!), web pages, etc. Is there a way to search in Client A's folder and all sub-folders for just InDesign files? Thx.

    You can use the filter panel for this. Click on the triangle in front of
    File Type (if it is not already open yet because it does so the moment there
    are two or more different File types in the folder you pointed Bridge to)
    Click on the File type you want to show and only those will appear in the
    content window
    Is there a way to
    search in Client A's folder and all sub-folders for just InDesign files? Thx.

  • Search For Specific File Type (eg .txt)

    I know how how to find files in a folder using Java but how do you search for specific file types. I am looking only include files with the extension .txt in my search.

    Cheers. I already looked at that. Got a program that parses a XML and had a play about with it. Can print the contents of tags in my XML. Its just that im trying to parse my XML and have the contents of the starts_with tag to appear in startsWith(or a variable to which this has been assigned) and the contents of the extension tag to appear in endsWith. Totally clueless on how to go about it.
    Below is my class. Would be greatful if you have any ideas.
    import java.io.File;
    public class FindLatestFile {
                 public static File getLatest(File thisDir){
                         long latestModDate = -1;
                         File latestFile = null;
                         File[] fileList = thisDir.listFiles();
                         for(int i=0; i < fileList.length; i++){
                             File file = fileList;
         if (file.lastModified() > latestModDate & (file.getName().startsWith("A") & file.getName().endsWith(".txt"))) {
         latestModDate = file.lastModified();
         latestFile = file;
                             return latestFile;

  • Spotlight: How to search for specific file types?

    Hi. I'm looking for bookmarks that may contain a particular word. Is there a way to filter my spotlight (or finder) searches just for a particular file type? I know you can sort results by file type, but it's rather just filter in the first place...

    Command F should do it. Once the search window appears, you should see a drop down box headed kind and next to it one headed any. Select PDF from the any one. Click the plus button, and another field will appear and you can see again more drop down boxes. You just want to set these up so you end up with name and contains, you can then add your text to the remaining field.
    Also see [this|http://apps.tempel.org/FindAnyFile/index.html]
    Message was edited by: gumsie

  • Is it possible to include several file types in a saved search?

    I want to have a saved search that shows recently changed sound files in the Finder.
    It works great with one file type, but I want to have two.
    Right now I have "Audio IFF", but I also want to include "WAVE".
    However, if I add another "Kind" and "other", and set it to "WAVE", the "Audio IFF" files disappears from the search.
    Any idea how I can combine two file types in the search?

    I want to have a saved search that shows recently changed sound files in the Finder.
    It works great with one file type, but I want to have two.
    Try the following:
    Starting from a Finder search window, change the first condition from "Kind is" to "Last Modified date" is "within last" xxx days:
    From that window, hold down the option key, and click on the plus sign at the right:
    This will bring up a multi-condition entry form that you can use to construct an "OR" search. Be sure it is set for "Any" of the following are true, and then click on the lowermost plus sign to set up the second OR line:
    Finally, set up each condition as KInd is Other, and enter your choices:
    Then save the search.

Maybe you are looking for