How to search the file in all directories

dear sir,
i know how to retrive ms word while clicking the button action.,
if know the path of file where it exists.
if i dont know the path,i want to search ms word in exiting all directories
and retrive msword .how to do search the file?
please help me ,
thanks ,
pullareddy
[email protected]

Lets go back to your first question, the one you didn't post here. Why do you want to "retrieve ms word"? My guess is that you want to execute the Microsoft Word executable program and have it load a Word document that you happen to have available.
If that's the case (and dozens of people have already asked that here), then do this:Runtime.getRuntime().exec("start yourdoc.doc");but put the actual file name in there in place of "yourdoc.doc".
If you have some other reason for wanting to find MS Word's executable (e.g. you want to delete it), then please reply to this post and let us know.

Similar Messages

  • How to search the file in all directoris

    dear sir,
    i know how to retrive ms word while clicking the button action.,
    if know the path of file where it exists.
    if i dont know the path,i want to search ms word in exiting all directories
    and retrive msword .how to do search the file?
    please help me ,
    thanks ,
    pullareddy
    [email protected]

    Sorry I do not understand your question.
    If your question is
    1. How Do I iterate over files in a Directory? Then see A1.
    -or-
    2. How do I let the user select a File (Dir)? Then see A2.
    A1:
    void processDir( String dirPath ) {
    File dirFP = new File( dirPath );
    String dirs[] = dirFP.list();
    for ( int i = 0; i < dirs.length; i++ ) {
    String fileName = dirs;
    String dirName = dirPath + File.separator + fileName;
    File theFile = new File( dirName );
    if ( theFile.isDirectory() == true ) {
    processDir( dirName );
    else {
    // Not Directory! ... It is a file!
    int nDot = fileName.indexOf( '.' );
    String ext = (nDot > 0 ) ? fileName.substring( nDot ) : "";
    // Process File...
    // To see if the extension is of a
    // particular Type...
    if ( ext.compareTo( "xyz" ) == 0 ) {
    // Process special file type...
    A2:
    String BrowsePath( )
    JFileChooser chooser = new JFileChooser();
    chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY );
    chooser.setMultiSelectionEnabled( false );
    JFrame parentFrame = null; // Or better!
    int returnVal = chooser.showOpenDialog(parentFrame );
    String result = null;
    if (returnVal == JFileChooser.APPROVE_OPTION)
    File selectedFile = chooser.getSelectedFile();
    result = selectedFile.getAbsolutePath();
    return result;
    -John
    null

  • How to read the files in different directories

    how to read the files in different directories here directory names will change dynamically under root node.
    let me say
    rootnode---->subnode1
    >subnode2
    >subnode3
    >subnode n
    how to specify these in file adapter.

    Hi
    look at this thread your problem is solved here
    File Adapter
    Regards
    Abhishek
    Edited by: Abhishek Agrahari on Dec 16, 2008 11:37 AM

  • How to search to files based on the metadata of the category in CS

    Hi,
    Can any one tell me how to search the files in the content services based on the metadata of the Category,I know how to search based on the Category using
    public static void attributSearch(String searchString)
    throws FdkException, RemoteException, Exception
    // get the Manager instances
    SearchManager sem = s_WsCon.getSearchManager();
    CategoryManager cat = s_WsCon.getCategoryManager();
    CommonManager cm = s_WsCon.getCommonManager();
    FileManager fm = s_WsCon.getFileManager();
    Item folder = fm.resolvePath("/idc/workspaces/BoardMembersProject", null);
    AttributeRequest[] catAttr =
    WsUtility.newAttributeRequestArray("ProjectCategory");
    // create AttributeRequest to retrieve CATEGORIES attribute
    AttributeRequest[] catClassAttr = WsUtility.newAttributeRequestArray(
    Attributes.CATEGORIES, catAttr);
    // define search options
    NamedValue[] nv = WsUtility.newNamedValueArray(new Object[][] {            
    { Options.SEARCH_VERSION_HISTORY, Boolean.TRUE },
    { Options.RETURN_COUNT, new Integer(100)
    // get search expresiion
    SearchExpression seExp = new SearchExpression();
    // searchString ="ProjectCategory";
    Item[] item = cat.getRequiredCategories(folder.getId(),catClassAttr);
    seExp = new SearchExpression();
    NamedValue[] attributes = item[0].getRequestedAttributes();
    seExp.setOperator(FdkConstants.OPERATOR_HAS_CATEGORY);
    seExp.setRightOperand("["+item[0].getName()+"]");
    // search documents
    NamedValue[] result = sem.search(seExp, nv, null);
    // search result display
    for (int i = 0; i < result.length; i++)
    if (result.getName().equals(Options.SEARCH_RESULTS))
    Item[] resulItem = (Item[]) result[i].getValue();
    WsUtility.log("Kveni",resulItem);
    if (resulItem != null)
    for (int j = 0; j < resulItem.length; j++)
    WsUtility.log("File " +resulItem[j].getName());
    But how do one search Based on the attributes of the category??
    thanks
    kveni

    Download the PM accelerator kit appropriate to your environment, and check out the TestSearch2.java example.
    http://www.oracle.com/technology/products/cs/developer/contentservicesdev/contenservicesdevkit.html
    Essentially you need to lookup the internal names of your category attributes, as well as have the internal name of your category class.
    categoryClassName = ...; // e.g. AHC_XXX
    attribute1name = ....; // e.g. CUSTOM_MYBOOLATTR
    you then create a normal search expression such as
    String attribute1Operand = "[" + categoryClassName + FdkConstants.SEPARATOR + attribute1name + "]";
    SearchExpression expr1 = new SearchExpression();
    expr1.setOperator(FdkConstants.OPERATOR_EQUAL);
    expr1.setLeftOperand(attribute1Operand);
    expr1.setRightOperand(Boolean.TRUE);
    Matt.

  • My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    WINDOWS?
    Connect the iPod to your PC. If iTunes starts syncing (ie erasing) your music automatically, hit the X in the upper right hand corner of iTunes display, to the left of the search box, to stop it.
    In Control Panel, Portable Media Devices, double-click your iPod.
    In the Tools menu -> Options, in the View Tab, check "Show hidden files and folders."
    Navigate to the Music folder. On my 'pod, the full path is
    Portable Media Devices\NAME of IPOD (F:)\iPod_Control\Music
    Select all the music folders, and drag and drop them into a folder on your hard drive, or directly into iTunes.
    And you're done! The iPod music folder structure is strange and inexplicable, but once you move your files into iTunes you can set it to automatically organize your folder by artist and album to clean that up. (To do this, in iTunes Edit menu, choose Preferences and in the Advanced tab, check "Keep iTunes Music Folder organized."
    might be out of date worth a try

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I find the files in all folders named Camera 1?

    Is there a way to search and find all of the video files in a certaint folder name? For example: I have many folders in different directories labled as Camera 1. I would like to be able to search for the files in all folders named Camera 1, but exclude any similar file types that might exist in other folders such as Camera 2, Camera 3, etc... Is there any way to do this?

    You should be able to sort by file name, file size, or last modified date by clicking the column heading. If the column headings are gone or you do not have all those details, there might be a way to reset your FireFTP settings but I've never researched it.

  • How to search the content of TPL files?

    Hi. I have a folder with hundreds of template "tpl" files that I'm needing to search the file contents of but using the regular search of that folder is unable to search the content of the tpl files, is it possible to do so?
    Thanks!,
    Wesley

    I assume there's not a "scan all files" with Spotlight?
    I don't think that would be possible in the specific case of content searches. Here's my understanding:
    EasyFind searches the files themselves when it looks for content, which makes it slow but very flexible.
    In contrast, Spotlight searches a pre-existing index when it looks for things - it can be instructed to search the index in various ways, but if the desired information is not in the index in the first place, it won't be found. Indexing the content of every file in the system is not feasible, so only the contents of certain file types get indexed. I found the following in [this Wikipedia article|http://en.wikipedia.org/wiki/Spotlight_%28software%29]:
    Aside from basic information about each file like its name, size and timestamps, the mdimport daemon can also index the content of some files, when it has an Importer plug-in that tells it how the file content is formatted. Spotlight comes with importers for certain types of files, such as Microsoft Word, MP3, and PDF documents. Apple publishes APIs that allow developers to write Spotlight Importer plug-ins for their own file formats.[3]
    So unless you'd care to write your own Spotlight Importer plug-in for tpl files, I think you are out of luck!

  • How to transfer file from ipod touch to i tunes. i have files in my ipod , ut itunes is  new so its telling if u sync the ipod all the files will be replaced but no files in the itunes.. so kindly help me how to transfer the files  from i pod to itunesb

    how to transfer file from ipod touch to i tunes. i have files in my ipod , ut itunes is  new so its telling if u sync the ipod all the files will be replaced but no files in the itunes.. so kindly help me how to transfer the files  from i pod to itunes......

    Some of the information below has subsequently appeared in a document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991
    Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was designed for you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchased content.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only media purchased from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software. Examples (check the web for others; this is not an exhaustive listing, nor do I have any idea if they are any good):
    - Senuti - http://www.fadingred.com/senuti/
    - Phoneview - http://www.ecamm.com/mac/phoneview/
    - MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/
    - Sharepod (free) - http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2 - Windows
    - Snowfox/iMedia - http://www.mac-videoconverter.com/imedia-transfer-mac.html - Mac & PC
    - iexplorer (free) - http://www.macroplant.com/iexplorer/ - Mac&PC
    - Yamipod (free) - http://www.yamipod.com/main/modules/downloads/ - PC, Linux, Mac [Still updated for use on newer devices? No edits to site since 2010.]
    - 2010 Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/message/11624224 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive - https://discussions.apple.com/docs/DOC-3141 - dates from 2008 and some outdated information now.
    Copying Content from your iPod to your Computer - The Definitive Guide - http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/ - Information about use in disk mode pertains only to older model iPods.
    Get Your Music Off of Your iPod - http://howto.wired.com/wiki/Get_Your_Music_Off_of_Your_iPod - I am not sure but this may only work with some models and not newer Touch, iPhone, or iPad.
    Additional information here https://discussions.apple.com/message/18324797

  • For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    Hi Spam_Valley,
    I understand that you are having issues with your music displaying correctly. This may be an issues with the metadata stored within that song, and iTunes interpretation of that info.
    We may need to repair this. See the following resources for information:
    iTunes 10 for Windows: If song titles don’t appear correctly
    http://support.apple.com/kb/PH1468
    Fixing Incorrect Song or Album Listings in iTunes
    http://support.apple.com/kb/TA24677
    Thanks,
    Matt M.

  • I tried to rename a file, it gave me an error message (can't remember the number - 43??) and then the file disappeared from the original folder. When I do a search, the file comes up under the new name, but it does not show a path, and even though preview

    I tried to rename a file, it gave me an error message (can't remember the number - 43??) and then the file disappeared from the original folder. When I do a search, the file comes up under the new name, but it does not show a path, and even though preview shows the contents, I can't open the document (Powerpoint) and I can't move the document. I tried "Copy" and paste but it doesn't work. I tried "Share" with Airdrop and iChat, but the file is inaccessible. When i try to rename the file, it says the filename is too long.
    When I try to open it, it says the alias is not good, and asks if I want to fix the alias. I'm afraid to do that and lose all access to this document.
    Right now, it feels like a ghost document - it is on the computer intact, but it is in an undisclosed location and inaccessible.
    Please help!!

    I was able to resolve this by repairing permissions, even though no permissions error was listed specifically for that file.
    I could also have recovered it through Time Machine, but I'm interested in knowing how not to have this happen again!
    I was afraid of rebooting and possibly losing track even of the ghost.
    I did not try EasyFind - I'll keep that in mind next time.
    Thanks for all the comments.

  • How to include header files from different directories?

    Hi,
    Sorry for the newb question, but I can't figure this out. I'm trying to compile a simple piece of code (C++) that uses header files in a directory different from the Project directory; header files are in /opt/csw/postgresql/include/pqxx. I've tried a few different things, adding that directory to the include directives under Resource Files, add existing files from a folder, etc etc. Whenever I try to build, dmake bails with status -1. I can't seem to get this working, can someone explain how to use header files from different directories?
    Thanks,
    SlowToady

    Header files are usually specified relative to a base directory. If the base directory is not a system directory -- /usr/include or the compiler installation directory -- add a command-line directive
    -I path/to/base/dirfor each such directory.
    The path can be absolute, such as
    -i /opt/csw/postgresql/includeor relative, such as
    -I ../../my/includeIn your source code, specify the header file relative to the base directory, and be sure to use quotes, not angle brackets. Example:
    #include "header.h"  // right
    #include <header.h>  // wrongThe angle brackets are used for system headers, like <iostream> or <stdlib.h>.
    The rules above are common to all compilers on Unix and Linux, and generally to all C and C++ compilers.
    For more details, read about the -I option in the C++ Users Guide. You can find the guide by pointing your browser to the "docs" directory in the compiler installation, or go here:
    http://docs.sun.com/app/docs/doc/819-5267
    All command-line options are described in Appendix A.

  • How to search a string in all opened html report ?

    Hey people .. Sorry to bother U again.. I have a problem again.. and thanks to solve my previous problems...
    I want to make an application in which I want to search a result string
    in all opened Html reports... If I don't want to go to the all
    desination and search one by one.. Is there any method to search the
    result in all opened reports at that time..
    I am very confulsed .. I have no Idea how I am gonna solve it... If anybody can help.. I would really appreciate that.. Thanks..

    Thanks Justin I have managed that problem..
    I am stuck at another one.. If you can help.. I have also posted addressing you in another relavent Thread..
    I have a spreadsheet data which has 286*516 Pixels data. Data is 16bit
    (from which only 12bit is usefull). Each data is a Level of a Pixel. I
    want to Display Grayscale Image.
    I have used 3D Graph to display it and projection XY selected . I am
    getting My image as grayscale Image but somewhat slow display if I
    continously run it.
    Second Method I tried is Directly "some 2D Graph" ( Sorry I forgot the
    Name.. I will get it next time) which directly display that 16 bit
    spreadsheet file. But it has only 255 levels so it didn't utilized my
    data and resolution is poor.
    My doubts are..
    1. Is 3D graph method I am using is Actually displaying my 16 bit image.
    2. In 3D graph method : Because of that 12 bit format of my data and I
    had to convert it in 16 bit I am loosing any levels or       
        Resolution ?
    3. Is there any way of increasing 255 level to 16bit level 2D Graph method.
    4. Is there any method that can display my 16bit information as a image utilizing all my levels.
    Please Do me a favor .. thank you

  • How to search .java files by Search tool in NWDS or any other tool?

    Hi All,
    I can easily search .JSP files by NWDS's Search tool, but I have a hard time to search Java files by this tool.  Can anyone guide me how to search Java files which contain a specified string by using Search tool in NWDS? or any other tool?
    Thanls. Jin

    Hi Jin,
    You can search Custom Java files with NWDS Search tool for specified string. But not standard Java files.
    Suppose you have extend z_userR3 base on UserR3 and contains string some help then you can click on search in NWDS
    Then click on File it will open Search box with 4 tag
    1. File Search
    2. Help Search
    3. Java Search
    4. Plug-in Search
    Click on File Search tab and provide the text in Containing text input box and give java file name with wild characters like  *.java
    Select Workspace under Scope and hit search button. It will search string in your custom Java file. This method will not search string in Standard Java classes of SAP.
    If you want to search in standard SAP  java classes then you should know about what you are searching i.e. whether it is field, Method, Package, Constructor and Type  select proper radio button under Search For box then tryo to select proper radio button under Limit To if you want to search everywhere then select All Occurrences. You should select Workspace under Scope.
    Suppose nothing comes after selected Type then go for other option one by one Method, Field etc...
    Expert people will give you more information.
    I hope this will help you.
    Regards.
    eCommerce Developer

  • How to get the values of all elements and sub elements from  following xml

    how to get the values of all elements and sub elements from following xml...
    <?xml version="1.0" encoding="UTF-8" ?>
    <List_AML_Finacle xmlns="http://3i-infotech.com/Cust_AML_Finacle.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://3i-infotech.com/Cust_AML_Finacle.xsd List_AML_Finacle.xsd">
    <TransactionID>TransactionID</TransactionID>
    <Match>
    <Src_Matched_Field>Src_Matched_Field</Src_Matched_Field>
    <List_Matched_Field>
    <FSFM_Matches>
    <NUMBER>NUMBER</NUMBER>
    <TERROR>TERROR</TERROR>
    <TU>TU</TU>
    <NAMEU>NAMEU</NAMEU>
    <DESCRIPT>DESCRIPT</DESCRIPT>
    <KODCR>KODCR</KODCR>
    <KODCN>KODCN</KODCN>
    <AMR>AMR</AMR>
    <ADDRESS>ADDRESS</ADDRESS>
    <SD>SD</SD>
    <RG>RG</RG>
    <ND>ND</ND>
    <VD>VD</VD>
    <GR>GR</GR>
    <YR>YR</YR>
    <MR>MR</MR>
    <CB_DATE>CB_DATE</CB_DATE>
    <CE_DATE>CE_DATE</CE_DATE>
    <DIRECTOR>DIRECTOR</DIRECTOR>
    <FOUNDER>FOUNDER</FOUNDER>
    <TERRTYPE>TERRTYPE</TERRTYPE>
    </FSFM_Matches>
    <OfacMatchDetails>
    <UID>UID</UID>
    <TITLE>TITLE</TITLE>
    <SDNTYPE>SDNTYPE</SDNTYPE>
    <REMARKS>REMARKS</REMARKS>
    <ID_UID>ID_UID</ID_UID>
    <IDTYPE>IDTYPE</IDTYPE>
    <IDNUMBER>IDNUMBER</IDNUMBER>
    <IDCOUNTRY>IDCOUNTRY</IDCOUNTRY>
    <ISSUEDATE>ISSUEDATE</ISSUEDATE>
    <EXPIRATIONDATE>EXPIRATIONDATE</EXPIRATIONDATE>
    <ADDRESS1>ADDRESS1</ADDRESS1>
    <ADDRESS2>ADDRESS2</ADDRESS2>
    <ADDRESS3>ADDRESS3</ADDRESS3>
    <CITY>CITY</CITY>
    <STATEORPROVINCE>STATEORPROVINCE</STATEORPROVINCE>
    <POSTALCODE>POSTALCODE</POSTALCODE>
    <COUNTRY>COUNTRY</COUNTRY>
    </OfacMatchDetails>
    </List_Matched_Field>
    </Match>
    </List_AML_Finacle>

    avoid multi post
    http://forum.java.sun.com/thread.jspa?threadID=5249519

Maybe you are looking for

  • Flash in java applet

    is there any way to use .swf in java applet?I mean a banner with flash at the top of applet.

  • Chipset drivers are a disorganized mess.

    I took the time to leave you honest feedback for your MSI FM2-A55M-E33 chipset driver download. If this is the best that MSI can do then I will not be purchasing another MSI product.

  • New 2012 iMac slower SD renders from AE than a 2007 MacPro?

    Hi there - I just purchased a new iMac for our small production house.  99% of the time, we are loving the machine: the performance, the stability, the speed, are all significant improvements over our 5 year-old Mac Pros.  We have run numerous tests

  • This is interesting..fonts showing properly when NOT activated

    Version 10.0.0.70 of InDesign. If I open a clients CC file I get no warning that the fonts are not active and they display properly. While this can certainly be useful if the fonts are not provided it's also potentially dangerous. I can package the f

  • How to validate XML against Schema

    Hi, I am trying to validate the XML against the schema by using follywing code but i am never getting errors in parser it always passes the parser even though there are serious parsing problems. My code is as follows: SAXParserFactory spf = SAXParser