Search a file

how can i search for all the *.txt files in my java folder
and when found i want to display the name of the files
very much like
dir command in dos

Cross-post:
http://forum.java.sun.com/thread.jsp?thread=404685&forum=4&message=1770087

Similar Messages

  • Search Remote Files... or ...How Do I Delete All of My LCK Files?

    hey everyone.
    i need to delete a bunch of .LCK files from my server so
    Dreamweaver
    will stop telling me someone else has stuff checked-out and
    that i need
    to enable blah blah blah. i can't just check everything in
    because A.
    that would take forever and B. the "person" who has them
    checked out is
    actually me, from a previous site definition that is now gone
    because i
    had to recreate it.
    unless i'm missing something (and i've been spending some
    time looking
    for it), there doesn't seem to be a way in Dreamweaver (at
    least in
    version 8, which is what i have) to search for files on the
    remote view.
    and even if there was, it doesn't look like the remote view
    displays
    hidden files, i.e. .LCK files.
    my server control panel does give me the option to search for
    files
    using the file manager, but it only searches the folder you
    have
    selected, and no sub-folders. there are hundreds, maybe
    thousands of
    folders on this thing, and it would really take a long time
    to click on
    each and every folder, search for the .lck files, and then
    delete them.
    so, my question is, what would be the best/easiest way to
    find and
    delete .lck files (or really, any file for that matter) on
    the remote
    server?
    thanks!

    i do NOT want check-in/check-out enabled. i'm trying to get
    rid of it
    altogether, but i tried selecting the checked out files to
    check them
    back in, and it said there were none.
    there is no "unlock" option, so i guess i need to pick check
    in. but
    here's my question, since it's this other instance of "me"
    that has them
    checked out, will this work? it's not recognizing me or my
    computer or
    whatever as the person who has them checked out. i think it's
    because i
    had to recreate my site definition about a week ago or so,
    and i deleted
    the old one. so it's like a user that no longer exists has
    them checked out.
    Alan wrote:
    > Do you want checkin/checkout to still be enabled when
    this is done?
    >
    > try this or a variation of it-
    >
    > in the Files Panel, right-click on the root site folder
    and pick checkin. Or
    > unlock.
    >
    >

  • How to search a file from a hierarchy and delete it

    hi ,
    i have to delete a file from a directory structure .i dno't know where is file stored in my folder hierarchy .i have to search that file and delete that file .
    for example ;
    i have a folder name A , which have folder B ,C ,D ,E . B folder have other 2 folder or 3 file (anything) , same C and D And E can have file or folder .
    means we dnot know that A folder have how many files or folder in it . in that we have to search a specific file and delete it .

    hi vineet ,
    this is only for u .
    here is my code
    class serDir
         public static void main(String[] args)
              String dirname="/java";
              File f1=new File(dirname);
              if(f1.isDirectory()){
                   System.out.println("directory name "+dirname);
                   String s[]=f1.list();
              for(int i=0;i<s.lenght();i++){
              File f=new(dirname +"/"+ s);
              if(f.isDirectory()){
    System.out.println("directory name "+s[i]);
                   } else {
                   System.out.println("file name "+s[i]);
              } else {
              System.out.println(dirname+"is not directory" );
    but not working properly , now plz tell me what changes i should make to full fill my requirement . question is still same ....................waiting

  • Searching a file from structure and delete

    hi ,
    i have to delete a file from a directory structure .i dno't know where is file stored in my folder hierarchy .i have to search that file and delete that file .
    for example ;
    i have a folder name A , which have folder B ,C ,D ,E . B folder have other 2 folder or 3 file (anything) , same C and D And E can have file or folder .
    means we dnot know that A folder have how many files or folder in it . in that we have to search a specific file and delete it .

    Look at the HttpUnit extension for Junit (www.junit.org) for a great package for accessing and "parsing" http data.
    Or you could simple open a connection (via the URL class) and then do an indexOf or use a regular expression package (jakarta-oro is good one).

  • When looking at my "About This Mac" it says that I have 60gb of space left on my hard drive, but when I go into finder to find all of these files there is not 300gb worth in anything I search, even searching, "All files on the Mac". Help!?

    When looking at my "About This Mac" it says that I have 60gb of space left on my hard drive, but when I go into finder to find all of these files there is not 300gb worth in anything I search, even searching, "All files on the Mac". Help!?
    It says I have over 150 gigs of video on my hard drive. But I have gone through and deleted almost all of what shows up, still it says there is roughly the same amount on the hard drive. Where are these files? I want to delete them so I can have my hard drive clear.
    Thanks for your help guys!

    Quote from the article.
    Time Machine in OS X Lion includes a new feature called "local snapshots" that keeps copies of files you create, modify or delete on your internal disk. Local snapshots compliment regular Time Machine backups (that are stored on your external disk or Time Capsule) giving you a "safety net" for times when you might be away from your external backup disk or Time Capsule and accidentally delete a file.
    So what makes a notebook any different then a desktop, other then with a desktop you might have your tm backup drive connected all the time.
    The object here is to not indiscriminately delete files you need or want to keep. I personally have never deleted a file I wanted to keep.
    In essence a backup is for catastrophic failure of your system. So it can be restored once that failure has been fixed. Not because you go in willy nilly and start deleting files.

  • 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 to search for file in jsp page

    i need help on how to search for a file in a folder where there is a lot of subfolder.like how u search in a document in windows. i need a complete codes in jsp page.
    thank you in advance.
    Message was edited by:
    n_dilah

    no i need to do a search engine in jsp page which is the j2ee.
    i type smth than tat file from any folder will appear the same way when u need to search your file in a document in windows.
    well can u nice people tell me where i can get the codes bcos i stinks when it come to programming.
    thank you very very very much.

  • 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

  • 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.

  • 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 do I stop Windows 7 from searching hidden files and folders

    In XP it was simple with the intuitive Advanced Search Options.
    Even if you enable "Don't show Hidden Files and Folders" in Windows 7, they still show up in the search menu.  A similar post included a suggestion by a support dude to post a question here.  I've searched for every possible solution and yet something so simple appears to be non existent.  Has Microsoft just lost its mind with omitting this feature?  Is this something that will never be solved?  Indexed or not, hidden files and folders still appear in Search.
    Thanks

    what have you setup in Explorer->Organize->Folder & Search Options?
    Don't show hidden and Hide: Empty, Protected, etc. all ticked
    if you have at some stage indexed all those system folders, and subsquently removed those from the index scope, then you may need to rebuild the index so those results are not presented by searches?
    i've assumed that you are getting things like \windows included, and this seems to be typical. perhaps because some common tools like notepad, wordpad etc reside in those folders.
    have you checked out the Indexing Options?
    from memory, "don't show hidden & system" really only obscures the stuff when you're browsing in explorer. the indexing engine doesn't respect that kind of setting. you'll need to get your indexing scope worked out to affect the search results presented.
    I'm not concerned much with indexing, it's just amazing that there is no option to stop "Search" from searching hidden files and folders when "Don't show hidden" is checked - the way it was with XP, etc.  As I understand it whether folder is indexed or not, will not stop "SEARCH" from searching them.  It was quite simple in XP but in Windows 7 it seems it is impossible.

  • 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...

  • Read Document in FileUtilities  cannot search a file with french character in the file name

    Hi,
    I am trying to search a file with french character in the file name like 'captures écran.doc' in my unix server directory, and Write the file somewhere, say in a list of documents or, write on file system to another directory.
    I am using to Read Document in FileUtilities of Foundation, but it cannot read the file due to french character in its name. Although it can find any other file name without these french characters.
    Tried renaming but that also cannot find the file with french character name.
    Please provide any idea to solve it using LC operation.
    Regards,
    Rohan Raj.

    Hi Thomas,
    Thanks for the post, but I have already found a solution to it a month ago. Sorry for not posting the solution.
    You just have to set the '-Djava.property.file.encoding=ISO8859-1' into JVM argument of your server startup, and bounce the server back to pick the new JVM arg set. And now the service Read Document in FileUtilities of Foundation will read all french characters.
    ISO8859-1refers to "Latin alphabet no. 1," consisting of 191 characters from the Latin script. This character-encoding scheme is used throughout The Americas,Western Europe, Oceania, and much of Africa. It is also commonly used in most standard romanizations of East-Asian languages.
    regards,
    Rohan Raj.

  • Where is Search by File Name in Mountain Lion?

    My spotlight searches in 10.6 used to allow me to search either by contents or file name.  Now, in 10.8, I seem to be able to search by contents only.  Is there a way to get search by file name back?  Some preference somewhere?

    Use the box in Finder. Put the cursor there, hit the space bar, and you will get a + sign on the right. Hit it and you can select to search by name on the left.

  • Searching a file in application server

    Hi Guys ,
    Any ways by which i can search a file passed in my program in the sap network ...
    reagrds.

    check out this link
    http://sap.ittoolbox.com/code/d.asp?a=s&d=2241
    In the code sample given there (for a different purpose), check out the form
    <b>FORM SEARCH_PROT</b>
    The code within this form is what is required for your case. Note that you have slightly modify the code, the code given there is for listing all files in the directory.
    Just found a better sample at (after posting)
    http://www.sapassist.com/code/d.asp?d=1862&a=s
    Regards
    Raja
    Is my answer for your previous Uplaoding PDF file to Application server and Web application from net Direc useful. Do you need more help on that?

Maybe you are looking for

  • Best way to record high SPL audio?

    I need a simple way to record higher SPL band rehearsals. I don't need studio quality or multi tracking. Just an audio recording that clear and as un distorted as possible. I know the built in mics on Idevises are not really made for higher volume st

  • Command  in Solaris

    Hi I am bit confused woth command df -h and du -sh. can somebody help me?

  • Is it possible extend a Task Flow at runtime?

    Hello I have a requirement in where we need to define a Bounded Task Flow with multiple views (today we are using a router with 3 views). The requirement is to extend the number of views at run time, create a 4th view without a new deployment. Is it

  • How to disable "about:newtab" text in address bar of each new tab Firefox 13

    Many of us have habit of opening a new tab & start writing web address/search query in address bar with Firefox 13 if I open new tab and just try to search firefox following appears in address bar about:newtabfirefox (about:newtab is already written

  • Login attempts to Publisher

    Hi guys. We traced that if we enter incorrect login/password to Publisher login page, then it performs 20 ATTEMPTS of login (10 times simultaneously and 10 times after 5-10 seconds after that), all of these attempts fail of course. How can I change t