Search for file on local drives

Hi,
How do I search for a file on the clients local drives with a Java Application?

Get a FileSystemView, iterate over all File System Roots and recursively look for all files and directories on each root until you found one with a matching name.
You should tell the user that he can go and grab a coffee while the process is running.

Similar Messages

  • Can spotlight search for files in external drives?

    I was wondering If I can index my hard drives so that when I do a search in spotlight, they show up along with the files in my primary drive.
    Is this possible?

    Yes, but due to connection reliability of external drives, and the constant background noise that is required to keep the index up to date on them, I turn it off for external drives. I use File Buddy or Easy Find to find files on external drives.

  • Searching for files on a Mac OSX server too slow!

    I have a G5 mac which I recently upgraded to Leopard OS. Searching for files on internal drive is just as good as it was on previous OS but doing a file search on our Mac Server (10.4.11, 2x2GHz Dual Core Zeon) is as good as useless. If I make a new file on the server and do a search for it, it just hangs there, saying 'searching'.
    When my G5 had 10.4, server searches were almost instantaneous. I have to search the server all the time so this is a bit of a nightmare. Do I need to index the server or something? Please help!

    I downgraded to 10.5.2 because 10.5.6 broke the search feature but it is still not like 10.4.
    If I cannot get 10.5.2 to work with network searches, I will install 10.4.11 if I can. If not I'll call apple support every day until my support time expires.

  • I have a external hard drive connected, Finder will not let me search for files in the external hard drive how do i search in a hard drive

    i have a external hard drive connected, Finder will not let me search for files in the external hard drive how do i search in a hard drive

    What are you using to search? You should be able to search any drive in from the Finder. If you're having trouble, try "EasyFind" from the App Store (free). You can search any volumes with it.
    Clinton

  • Re: Searching for files

    Van,
    Here is a simplem recursive directory search example you can use to find a
    file on your drive. If you know the subdirectory off the root, then you'd
    definitely want to specify it to limit the searching on the drive.
    It can be used on other systems as well, but you may want to modify it to
    use portable file names. This example is specific for Windows
    platforms....
    Give it a try and hope it helps out...
    Dustin Breese
    PerSe Technologies
    begin TOOL DirScan;
    includes Framework;
    HAS PROPERTY IsLibrary = FALSE;
    -- START FORWARD CLASS DECLARATIONS
    forward FileSearch;
    -- END FORWARD CLASS DECLARATIONS
    -- START FORWARD CURSOR DECLARATIONS
    -- END FORWARD CURSOR DECLARATIONS
    -- START CONSTANT DEFINITIONS
    -- END CONSTANT DEFINITIONS
    -- START C DATA TYPE DEFINITIONS
    -- END C DATA TYPE DEFINITIONS
    -- START CLASS DEFINITIONS
    class FileSearch inherits from Framework.Object
    has public method FileExist(input iStartDirectory: Framework.TextData,
    input iFileName: Framework.TextData): Framework.boolean;
    has public method Init;
    has public method RunMe;
    has property
    shared=(allow=off, override=on);
    transactional=(allow=off, override=on);
    monitored=(allow=off, override=on);
    distributed=(allow=off, override=on);
    end class;
    -- END CLASS DEFINITIONS
    -- START SERVICE OBJECT DEFINITIONS
    -- END SERVICE OBJECT DEFINITIONS
    -- START CURSOR DEFINITIONS
    -- END CURSOR DEFINITIONS
    -- START TYPEDEF DEFINITIONS
    -- END TYPEDEF DEFINITIONS
    -- START METHOD DEFINITIONS
    method FileSearch.FileExist(input iStartDirectory: Framework.TextData,
    input iFileName: Framework.TextData): Framework.boolean
    begin
    // Method : FileExist
    // Author : Dustin Breese, PerSe Technologies
    // Date : December 10, 1997
    aDirectory : DirectoryFile = New();
    aDirectory.SetLocalName(iStartDirectory);
    aFileList : GenericArray of File = aDirectory.ListFiles(prefix = nil,
    suffix = nil);
    doesFileExist : Boolean;
    for aFile in aFileList do
    if (aFile.HasProperty(propName = OS_FP_ISDIR)) then
    dirName : TextData = New(Value = iStartDirectory.Value);
    dirName.Concat('\\');
    dirName.Concat(aFile.GetLocalName());
    task.part.logMgr.put('Traversing directory : ');
    task.part.logMgr.putLine(dirName);
    doesFileExist = FileExist(
    iStartDirectory = dirName ,
    iFileName = iFileName );
    elseif (aFile.GetLocalName().IsEqual(source = iFileName,ignoreCase =
    True) ) then
    task.part.logMgr.put('File found in directory : ');
    task.part.logMgr.putLine(iStartDirectory);
    doesFileExist = TRUE;
    end if;
    if (doesFileExist) then
    return TRUE;
    end if;
    end for;
    return FALSE;
    end method;
    method FileSearch.Init
    begin
    super.Init();
    end method;
    method FileSearch.RunMe
    begin
    -- The test will be to find calc.exe in the windows system directory.
    Self.FileExist(iStartDirectory = 'C:\\', iFileName = 'calc.exe');
    end method;
    -- END METHOD DEFINITIONS
    HAS PROPERTY
    CompatibilityLevel = 0;
    ProjectType = APPLICATION;
    Restricted = FALSE;
    MultiThreaded = TRUE;
    Internal = FALSE;
    LibraryName = 'dirscan';
    StartingMethod = (class = FileSearch, method = RunMe);
    end DirScan;
    From: Van Vuong <[email protected]>
    Date: Tue, 9 Dec 1997 10:18:33 -0600
    Subject: Searching for files
    I would like to scan the users local drives to verify that a certain
    file exists. The client is Windows 95. Any ideas?
    Van Vuong
    Internet: [email protected]
    PAGE NET

    I have this exact same problem, a solution would be good.
    EDIT: It looks as though this has just resolved itself for no reason. I've added a new source file and it's doing it again with stdint.h. I guess I just have to tolerate it until Eclipse decides to acknowledge the existence of the file (rebuilding etc with the index doesn't do anything).
    Not much help if waiting it out isn't working for the OP, he's been waiting a while...

  • Download Text file to Local drive from BSP Application

    Hi Guys,
    I am new to BSP, and I am doing a BSP application in which i want to download a text file to local drive C: on click of button. For that I am having a data in Internal table and Onclick event, in model class method DO_HANDLE_EVENT i want to download text file to local machine drive.
    Can anybody provide me full code with all data declaration and all?
    Your help would be appriciable. Thanks in Advance.

    Hi Jessy ,
    You can download the file from BSP pages using the method
    CL_BSP_UTILITY=>download.
    Please follow the below mentioned steps.
    1.Convert the text to a text table ie Internal table with a line type char255 or some others.
    2.Convert the text table into a string.
    3.Convert the string to XSTRING.
    4.Download that XSTRING as text file using the method
       CL_BSP_UTILITY=>download.
    Parameters:
    OBJECT_S    - XSTRING data
    CONTENT_TYPE  =  ' application/download'
    CONTENT_DISPOSITION = 'attachment; file=test.txt'
    RESPONSE                   = runtime->server->response
    NAVIGATION                   = navigation
    OBJECT_T
    I dont have system to give a programatical explanation to u.
    If you have any doubt kindly post.
    Reward for every useful solutions..
    Best Regards
    Renga

  • How can I: Search for files "not in catalog"

    Is there a way to search for files/photos on my hard drive that are *NOT* already in my catalog?
    (a) I can do a mass search to find all photos on my hard drive.
    (b) And there is a reconnect feature - for all entries in catalog with a missing/invalid link, look for the file that matches best.
    But I'd like to have Elements find photos that I have not added to the catalog.
    That is, do (a), but check each one to see if it is already added.
    Is there a way to do that?
    Thanks,
      -ceej

    What you want to achieve by finding those files?
    In folder view you can see the folder which have no media files in Organizer.
    If you import all the files form all the drives on your system, by deafult you will see files just imported into catalog. That means, just after import ou will have the files which were not in your catalog :-)
    I know my  answer could be confusing for you, but it will make sense if you know what happens after import in Organizer...

  • SQL 2012 Cluster- How to or Steps to Move Tempdb Files from Local drive to Shared volume

    Hi..
     I did Installation of SQL Server 2012 Cluster. During this setup I installed Tempdb Files on Local drive. Now I want to move this tempdb files from local drive to Shared Drive . When I am trying to move I am getting below error.
    Does any one can help me or provide the steps to move this tempdb files from local drive to Shared Drive ?
    Msg 5184, Level 16, State 1, Line 1
    Cannot use file 'Z:\Tempdb\tempdb.mdf' for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource
    of the Sql Server does not have a dependency on it.
    Thanks 
    Regards..
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

    Hi,
    The error message may be thrown out when you attempt to create a database on another shared cluster drive when the SQL Server resource is not dependent on that disk.
    Check if you are in the scenario which mentioned in the following article:
    How to create databases or change disk file locations on a shared cluster drive on which SQL Server was not originally installed
    http://support.microsoft.com/kb/295732/en-nz
    Here is a thread with similar issue:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c9f80af7-5b51-4c43-a2a0-f9c7d97aa41d/sql-disk-dependency-problem-on-sql-2008-cluster-including-errors
    Hope it helps.
    Tracy Cai
    TechNet Community Support

  • [CS5.5][Os X 10.7] Problem searching for file when placing a picture

    Hi,
    With this post, I would like to ask a question.
    In Indesign CS5.5 on Mac Os X, when placing a picture using the place option, there is in the top right corner a search field. When browsing to a certain network folder and trying to search for files whitin that folder, which have filenames containing a part of the search string, no files are found.
    For example: a folder containing 200 files with names starting with "sports baseball 001" up to "sports baseball 200". When searching for "baseball" no results are found.
    What I could find on the internet, are several discussions relating to huge problems with Spotlight on 10.7 and 10.8 and network drives.
    Does anyone know of any fix or plugin for Adobe Indesign that allows fast file search in a folder when placing a picture in a document?
    Whe have this issue with all our mac's running these versions of Os X and Adobe Indesign.
    Any feedback would be helpfull.
    John

    Good to hear that Adobe engineering is taking a look. However you might want to file a formal bug/feature report here: Wishform, to get it on record as a customer/user problem, and to perhaps attract additional requests from others who have the same problem.
    I'm not sure if the commercial Mac application Default Folder X would fix the problem. You might want to test their trial.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • A folder on my desktop is missing, when I search for files in the folder nothing comes up...

    a folder  on my desktop is missing, when I search for files that are in the folder nothing comes up!  There are no items in my trash! please help!!!!

    Well, now you know why you should have backed your data up. There are two kinds of computer users: those who have accidentally deleted important data in the past, and those who will do so in the future. You've just switched groups. If your data isn't backed up, it will all be lost sooner or later to boneheaded mistakes or hard drive failure. The only question is when. Good backups are cheap insurance against that day.
    Now that those files have been deleted, you'll have to use data recovery software to try to salvage them, assuming the space they occupied on your hard drive hasn't yet been overwritten (a pretty good bet if they were still visible yesterday and you STOP using your computer now, to avoid overwriting them before you recover them). To do so you'll need an external hard drive and one of the following recovery utilities:
    Data Rescue 3: http://www.prosofteng.com/products/data_rescue.php
    FileSalvage 7: http://subrosasoft.com/OSXSoftware/index.php?main_page=product_info&products_id= 1
    Both are offered in demo versions that will show you what the full version could recover before you have to pay for anything.

  • How do I exclude directories from Finder search results? I'm trying to find the biggest FILES on my computer and it keeps showing me "Macintosh HD" as the biggest, how can I search for files of type "NOT folder/directory"?

    Basically I've lost 10GB of free space over the last few weeks so my plan was to search for files modified in the last 2 weeks in order to figure out which ones are big and where that space went.
    So I open finder, go to "File > Find", and enter a search:
    Modified > In the last 2 weeks
    All fine so far.
    Problem is, it's showing whole directories as results. Which essentially means that when I order the list by size, Macintosh HD is at the top, followed by "Users", then "Applications", then one of my bigger movie files, then "Library", etc.
    How can I do a search which will ignore folders? I want individual files. Knowing that Macintosh HD is the biggest item on my computer and was modified in the last 2 weeks is utterly useless to me.
    Older versions of Finder in OS 9 had a feature where you could search for "files, whose type "IS NOT" folder", but OS X doesn't seem to have such a feature.
    Can anyone help?

    How much free space is on the HD, where has all the space gone?
    OmniDiskSweeper is likely the easiest/best, and is now free...
    http://www.omnigroup.com/applications/omnidisksweeper/download/

  • How can I search for files with more than one keyword?

    I´ve created some keywords, and some files in my folder are tagged with two, three or more keywords.
    Is there a way to search for files using more than one keyword on the search field?
    Thanks!

    Use the Find command (menu Edit) and in criteria at the right side is a plus sign to add another criteria and set it to your custom wishes.
    make a choice in results and you should be OK

  • How can I search for files on multiple servers at one time?

    When I hit command+F, and use spotlight to search for files, I'm only given the opportunity to search for those files in three places: "This Mac", "Shared", and then the server or external HD that is mounted. However, in the past I was able to check a box for all mounted/connected servers/HDs, and then do a search in all of them at the same time. I CAN'T FIND THIS OPTION IN LEOPARD AND IT IS ANNOYING ME BIG TIME.
    Hopefully there is a simple solution that I've overlooked.
    Please help!

    no

  • Mac mini Server 10.6  unable to search for files on the server from desktop.

    I'm running Mac mini Server 10.6 with 15 various Apple Mac desktops 10.4 / 10.6. The problem i'm having is that i'm unable to search for files on the server from any of the desktops. I have fixed permissions and rebooted. I can perfomr a search though command - F and spotlight from the server.
    Anyone have any ideas?

    I have a Mac mini server with Mac osx 10.6.8 installed --- I have a website {UNDER CONSTRUCTION} installed on it with a REGISTERED DOMAIN NAME belizeansworldwide.com -->[DNS service w/GoDaddy]  & DSL INTERNET service  w/VERIZON --- {My server is the ONLY DEVICE CONNECTED to my VERIZON DSL router/modem}
    When I enter my DOMAIN NAME or WAN IP # in my browser(s)--> Chrome OR Safari -- i get my Verizon modem
    set-up page-->{this incl the WAN IP# as I expected}----{NORMALLY I WOULD ACCESS MY Actiontec
    modem/router via 192.168.1.1} --- While in that webpage there's an option "shared files/folders"   & clicking on that option DISPLAYS MY WEBSITE --->  {"PORT FORWARDING DID NOT RESOLVE THAT"}
    My next attempt @ a solution was through my Server's SystemPreference>Sharing>Internet Sharing
    & this the Original Object of my post ===>  "MY SHARING PANEL DOES NOT INCLUDE THE OPTION
    FOR   'Internet Sharing' among the others like CD DVD, Remote Login,Remote Management, Bluetooth Sharing, etc.etc ---- Hope this additional info will help to clarify  &/or explain my problem
    Thanks, & best regards to you & yours

  • How to search for files using wildcards * and ?.

    Hi All,
    I've been searching the forum for a couple of hours now and have been unable to find a good example of how to search a directory (Windows OS) for a file using wildcards * and/or ?. Does anyone out there have a good example that they can share with me?
    Thanks

    Hi All,
    First of all I want to thank everyone for taking the time to respond to my question. All of your responses where greatly appreciated.
    I took the example code that was posted by rkconner, thanks rkconner, and modified it to allow me to search for files in a directory that contain * and/or ?. Yes, I said and/or! Meaning that you can use them both in the same file name, example: r??d*.t* would find readme.txt.
    I've posed my complete and thoroughly document code below. I hope it is very helpful to other as I have searched many forums and spent many hours today trying to resolve this problem.
    Enjoy
    * File Name: WildcardSearch.java
    * Date: Jan 9, 2004
    * This class will search all files in a directory using the
    * asterisk (*) and/or question mark (?) as wildcards which may be
    * used together in the same file name.  A File [] is returned containing
    * an array of all files found that match the wildcard specifications.
    * Command line example:
    * c:\>java WildcardSearch c:\windows s??t*.ini
    * New sWild: s.{1}.{1}t.*.ini
    * system.ini
    * Command line break down: Java Program = java WildcardSearch
    *                          Search Directory (arg[0]) = C:\Windows
    *                          Files To Search (arg[1]) = s??t*.ini
    * Note:  Some commands will not work from the command line for arg[1]
    *        such as *.*, however, this will work if you if it is passed
    *        within Java (hard coded)
    * @author kmportner
    import java.io.File;
    import java.io.FilenameFilter;
    public class WildcardSearch
         private static String sWild = "";
          * @param args - arg[0] = directory to search, arg[1] = wildcard name
         public static void main(String[] args)
              String sExtDir = args[0]; // directory to search
              sWild = args[1];   // wild card to use - example: s??t*.ini
              sWild = replaceWildcards(sWild);
              System.out.println("New sWild: " + sWild);
              File fileDir = new File(sExtDir);
              File[] arrFile = fileDir.listFiles(new FilenameFilter()
                   public boolean accept(File dir, String name)
                        return (name.toLowerCase().matches(sWild));
              for (int i = 0; i < arrFile.length; ++i)
                   System.out.println(arrFile.getName());
         }     // end main
         * Checks for * and ? in the wildcard variable and replaces them correct
         * pattern characters.
         * @param wild - Wildcard name containing * and ?
         * @return - String containing modified wildcard name
         private static String replaceWildcards(String wild)
              StringBuffer buffer = new StringBuffer();
              char [] chars = wild.toCharArray();
              for (int i = 0; i < chars.length; ++i)
                   if (chars[i] == '*')
                        buffer.append(".*");
                   else if (chars[i] == '?')
                        buffer.append(".{1}");
                   else
                        buffer.append(chars[i]);
              return buffer.toString();
         }     // end replaceWildcards method
    }     // end class

Maybe you are looking for