Get file list of directory files from URL ?

Hello,
GIven a URL directory, I would like to get a list of all the files in that URL directory:
url = new URL("http//www.example.com");
c = url.getContent();
// Suppose there is a file http://www.example.com/myfile.txt
// How do I get a list from c?
Essentially, I want something equivalent to the File "list" method
file = new File("H:/tmp");
list = file.list()
Thanks in advanced.

Crosspost: http://forum.java.sun.com/thread.jsp?thread=518669&forum=17&message=2475782

Similar Messages

  • How to get a list of uncompressed files in ms Windows XP?

    I am running XP sp3.  How can I get a list of uncompressed files on my hard drive?  Is there like an fsutil /s,  dir /s, or ls -la command that might work?  Do I need to use a for loop in batch cmd file?  Or is there a sysinternals
    command equivalent to streams /s that might do the trick that anyone knows about?

    Yes, thanks, that is one way I already knew about.  I want a list.  So yes I could take each of 100,000 files and note which ones are black and for each of them hit properties and cut and paste into notepad a file saved as "uncompressed.txt".
     I was hoping to avoid doing that work, since it would take a lot of time.  Do you know of a faster way?  Is there a sortable file field, like "status" or "attributes" that would work?
    Jason

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • Can you get ordered list of inserted Components from a JTextPane?

    Hello,
    Does anyone know of a way to get the collection of Components that have been inserted into a JTextPane? Further, assuming you can get such a collection, how do you know how they're positioned/ordered in the text?
    Thanks for any help,
    -Michael

    Hello Paul, that's true but I see some weird things happpening in my case. I know for sure my project related objects are moved to prod because I ran the processes in PROD but when I look at the source database the upgradeaction is set as 2, which mean 'none' and says copydone as 0 which implies it is not moved, which is in correct because I can see those in PROD when I open in app designer. So in this case I am missing some information in the report because of the filters UPGRADEACTION in (0,3) and COPYDONE = 1. Is there any other way other than this to get the list of migrated projects from source to target database.
    Thanks,

  • How do i get a list of SQL Servers from network?

    Hi everyone,
    I'm trying to get a list of SQL Servers from the network and put them into a drop-down combo box. I try to search on Google and i can only find some C# source codes which doesn't help me at all. I'm wondering if JAVA has the similar method to do so.
    btw, I'm using MSSQL Server 2005, JDBC 1.2, JDK 1.6.0_24
    thanks

    jschell wrote:
    flyto9 wrote:
    I'd been told to create a user friendly no brainer user interface In typical business scenarios involving databases that is ridiculous.
    A company that has multiple database servers must ALREADY understand the complexities of managing and using those databases.
    true, but you know as well as I do that requirements documents are usually not written by people with the least understanding on those complexities...
    And if a company assigns such a project to someone like OP who clearly doesn't know how to deal with such requirements documents, that only shows their morosity all the more clearly :)
    Assuming that I'm able to find a list of TCP connections on network, how do I know which of them are sqlserver?That isn't what I said. A "protocol" is a description of a methodology involving functionality and communication which solves a particular problem.
    There is a "protocol" which describes how to find MS SQL Servers. You don't make it up yourself. You find the description, read what it says and implement it.Or more likely (like Oracle) there's no such security problem in MS SQL Server and instead it relies on the client knowing the connection details or it'll never find them.

  • Using SQL stored procedures How to get the list of .rar files from e:\Tempbackup directories from the different remote desktop windows server and delete the .rar files which contains the current month and date

    Concept:
    Every month i need to find the list of .rar files from the
    E:/TempBackup directory from the different environments (remote desktop servers) and i need to delete the current month
    .rar files alone from the respective (E:/TempBackup) directory. below is example files structure inside the
    E:/TempBackup.
    example:
    zDROP_2014_08_31_Backups.rar
    zDROP_2014_09_31_Backups.rar
    zDROP_2014_10_31_Backups.rar
    from the above list i need to delete the zDROP_2014_08_31_Backups.rar(current month) file alone and also logs should be capture for this deletion.
    key words for this are zDROP and Current month and date.
    i need a stored procedure for this concept. could you please help on this.

    Hello,
    You can schedule an operating system task (Control Panel -> Schedule task) to either call a batch file or a PowerShell script.
    Please read the following resources for examples:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/61373719-fffb-4d94-bdbe-7d8ed8620b44/delete-filesfolders-on-remote-servers-using-powershell?forum=winserverpowershell
    http://www.networknet.nl/apps/wp/archives/943
    http://jeffwouters.nl/index.php/2011/10/powershell-script-to-delete-files-older-that-a-week/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Need to get file name and directory back from file adapter - WRITE

    I am using the file adapter to write a file. I want to log the file name of the file we just created. Since we use a precise timestamp in the file name, I can't accurately guess.
    I have an invoke in my BPEL process to the file adapter. My first try was to assign the jca.file.FileName property to a variable, but it never comes back. I looked around and saw plenty of ways to SET the file name for a write and GET the file name for a read, but no GET file name for WRITE.
    Anyone have a solution?
    Thanks in advance!

    I think I got your point... You can tell FileAdapter the filename to write, but if you don't then FileAdapter can not tell you the filename that it wrote... I think it is pretty possible Oracle didn't implement the latter, as the write operation is probably asynchronous and the filename is calculated later on...
    If what you want is just log, you may achieve your requirement by increasing verbosity on Adapter logs... Have a look at the link bellow...
    http://docs.oracle.com/cd/E15586_01/integration.1111/e10226/ad_mon.htm#CJHHBBID
    Otherwise, the solution for you will be to calculate filename yourself, and that will be a little bit of reinventing the wheel... But at least you will know the filename...
    Cheers,
    Vlad

  • Is there any way to play all files in a directory by one url?

    Hi all,
    I am testing fms this days, I have put all my files(such as 1.mp3,2.mp3...n.mp3) in my directory.
    I can play single file fine with url like this:
    rtmp://localhost/mp3/mp3:x/2
    but i want to know is there any way to play all files in my direcotry?
    for example, user click the play button, the player(smp) automatic plays all files in the directory, link windows media server.
    Should I use playlist? Or there is another better way?
    Thanks a lot.

    Hi,
    FMS do not directly take a directory to play files, the file names have to be fetched some way (through script if needed) to make a playlist and then the play command needs to be repeated as many times.
    Thank you !

  • How to get the list of registered phones from RTMT

    I need to get the list of the registered phones from RTMT in excel sheet or text file how i can do this ?????

    The approach you need to take depends on your CM/CUCM version.  In Windows based systems (3.3.3 to 4.2.3 at least, not sure about 4.3 actually) you can get data using devicelistx.asp.  This is discussed in the thread that James provided (+5 James).
    If you are dealing 5.x or later then you need to look at using RISport.  It is a little more involved but more powerful than devicelistx.asp.  Actually, I think RISport and the associated API was available in later 4x releases but was "hidden").
    I have a brief intro here:
    http://www.netcraftsmen.net/component/content/article/70-unified-communications/452-good-bye-devicelistxasp-hello-risport.html
    I probably need to get some of my notes together and put some examples on my blog now that I think about it.  Anyway, the above link is a quick intro with links to devicelistx.asp info and RISport API info.
    HTH.
    Regards,
    Bill
    Please remember to rate helpful posts.

  • .m4v files listed at spotify files not imovie

    I've been saving some old video tapes by importing them into iMovie 10.0.5. Some of them came from a previous iMovie version, 9.9.5 (?). Due to space constraints I moved them to an external disc and all of a sudden they're marked as Spotify files (.m4v). Spotify has become their default player! I changed the default player to quicktime in the Get Info window but their still listed as Spotify files. How do I fix this?
    Thanks for any and all help.

    Why don't you just use your install disk(s) and reinstall iMovie?

  • Dynamic File Name and Directory File Sender Adapter

    Hello gurus,
    I have a question: Is there any way to make the File Name, and Directory Dynamic of a File Sender Communication Channel ?
    For example, taking it as a parameter from a Web Service Request.. (I mean, the only way with this would be a ccBPM). I don't exactly know if there is a way, I just thought about this.
    Please tell me if someone could make Dynamic these 2 parameters while picking a file.
    Regards,
      Juan

    oops,thought i was replying to the PgP question:)
    I think you should be able to achieve this via adapter module but i m not really sure how exactly it will be done .
    Thanks
    Aamir
    Edited by: Aamir Suhail on Jul 28, 2009 1:42 PM

  • How do I get a list of cameras names from MAX to use in a CVI app?

    I wish to avoid any confusion in selecting cameras to use in my CVI application, so I'm looking for a way, from within my app, to get the list of camera names as set up in MAX. Then I can populate a listbox and the user can choose their camera without having to guess or refer to an external listing for the MAX name. The selected name will then be passed to IMAQdxOpenCamera.
    Thanks!

    Found it! (Should have looked in the hardware boards first, but it seemed to be a software question.) Anyway, use IMAQdxEnumerateCameras.

  • Organize iTunes file list by Directory Structure instead of artist/album?

    Hello, I have searched for different audio players for os x which might have this feature but so far have had no luck. What I'm looking for is a feature similar to that of foobar2000 for win32 where I can organize my music by directory structure without the iTunes automatic organization by artist/album. Is there a way I can accomplish this in iTunes with some sort of xml config or hidden options? Thanks.

    You don't have to have iTunes move music around on your hard drive (Preferences>Advanced>General, uncheck Keep iTunes Music folder organized and Copy files to iTunes Music folder when adding to library) but I suspect that's not what you're asking. You can't automatically view music from within iTunes by directory structure. iTunes organizes by ID3 tags ("mp3 tags"). You could, I suppose, spend a lot of time replicating your directory structure by using folders and playlists within iTunes but you'd probably have to do it all by hand.
    You could check out Doug's Scripts to see if there are some scripts that might help.
    http://dougscripts.com/itunes/index.php

  • How can I get a list of rated files in folders/subfolders?

    I use a star rating system to select which photos I need to work on. Each subject has their own folder. Within each subject's folder are subfolders, one for each time I have a photo shoot with them. The hierarchy looks something like this.....
    MainFolder
         Subject1
              Shoot1
              Shoot2
         Subject2
              Shoot1
         Subject3
              Shoot1
              Shoot2
              Shoot3
              Shoot4
         Subject4
              Shoot1
    And so on. The image files are within each "Shoot" folder. The thing I'd like to accomplish is to have a way that I can start with the main folder and check through all subfolders where image files are and build a listing of all rated image files that I can parse through to see which images I need to work on.
    Ideally I'd like to have them sorted from highest to lowest rating. I can do this by stepping through each folder and file within, checking the rating of each file, and continuing. What I'd really prefer to speed things up is to know if there is a way to check a folder's contents and filter it by rating. First, extract all the 5-star rated filenames, then 4-star, then 3-star, and so on. I cannot find anything in the documentation for Bridge scripting that allows for sorting/filtering folder contents. I currently have over 40,000 image files so checking through them one at a time even with a script would be a task which is why I'd like to know if there is a scripting method to filter out ratings within folders.
    Any help would be greatly appreciated. I can write the script...at least most of it I think...but things would go so much nicer for me with a filter/sort.

    How right you are Mark, you know I am gradually going senile
    This will do the same but will allow re-runs without re-creating the collections or adding duplicates.
    #target bridge
    var folders =[];
    var topLevel = app.document.presentationPath;
    folders = FindAllFolders(topLevel, folders);
    folders.unshift(topLevel);
    //Create 5 collections to put the files into
    var FiveStars = FourStars = ThreeStars = TwoStars = OneStar = undefined;
    var colls =app.getCollections();
    for(var a in colls){
        if(colls[a].name == "Five Stars") FiveStars= colls[a];
        if(colls[a].name == "Four Stars") FourStars= colls[a];
        if(colls[a].name == "Three Stars") ThreeStars= colls[a];
        if(colls[a].name == "Two Stars") TwoStars= colls[a];
        if(colls[a].name == "One Star") OneStar= colls[a];
    if(FiveStars == undefined) FiveStars = app.createCollection("Five Stars");
    if(FourStars == undefined) FourStars = app.createCollection("Four Stars");
    if(ThreeStars == undefined) ThreeStars = app.createCollection("Three Stars");
    if(TwoStars == undefined) TwoStars = app.createCollection("Two Stars");
    if(OneStar == undefined) OneStar = app.createCollection("One Star");
    for(var a in folders){
    var PictureFiles = Folder(folders[a]).getFiles(/\.(jpg|jpe|jpeg|gif|eps|dng|bmp|tif|tiff|psd|crw|cr2|rle|dib|cin|dpx|ps|pcd|pict|vda|icb|vst|wbm|sct|pbm|flm|psb|exr|pcx|pdp|nef|dcr|dc2|erf|raf|orf|tga|mrw|mos|srf|pic|pct|pxr|pdd|pef|png|x3f|raw)$/i);
    for(var p in PictureFiles){
    var Rating  = new Thumbnail(PictureFiles[p]).rating;
    if(Rating == undefined) Rating = 0;
    switch(Number(Rating)){
        case 0 : break; /* No Rating */
        case 1 : if(!app.isCollectionMember(OneStar,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(OneStar,new Thumbnail(PictureFiles[p])); break;
        case 2 : if(!app.isCollectionMember(TwoStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(TwoStars,new Thumbnail(PictureFiles[p])); break;
        case 3 : if(!app.isCollectionMember(ThreeStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(ThreeStars,new Thumbnail(PictureFiles[p])); break;
        case 4 : if(!app.isCollectionMember(FourStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(FourStars,new Thumbnail(PictureFiles[p])); break;
        case 5 : if(!app.isCollectionMember(FiveStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(FiveStars,new Thumbnail(PictureFiles[p])); break;
        default : break;
    function FindAllFolders( srcFolderStr, destArray) {
    var fileFolderArray = Folder( srcFolderStr ).getFiles();
    for ( var i = 0; i < fileFolderArray.length; i++ ) {
      var fileFoldObj = fileFolderArray[i];
      if ( fileFoldObj instanceof File ) {  
      } else {
             destArray.push( Folder(fileFoldObj) );
      FindAllFolders( fileFoldObj.toString(), destArray );
    return destArray;

  • Where can I get a listing of core files?

    I'm not looking for re-install Tiger, but I do know that over the past year and a half of using Tiger I've downloaded/installed countless applications/modifications/etc.
    What I'd like to do is remove a lot of that crap, but I there are quite a few files I'm not sure I can delete or not.
    Is there a listing of files somewhere?

    If you wish to uninstall an application, check it to see if there's an uninstaller. See the read me file that came with the installer. If so, run that. Most, but not all 3rd-party apps, are installed by dragging them to your Applications folder and you can delete them by dragging them to the trash and emptying it. Most, also, have one or more preference files stored in ~/Library/Preferences/. To find out where an application stored every file, for those that made one, you could open its package in /Library/Receipts/, Launch the Terminal.app,, type this in, followed by a space, and then drag the Archive.bom into the terminal window, and hit the return key:
    lsbom
    For example, if you wanted to know where the QuickTime 7.1.2 update put files, the command would look like this:
    lsbom /Library/Receipts/QuickTime712.pkg/Contents/Archive.bom
    Good luck with your project.
    G4 450 MP Gigabit   Mac OS X (10.4.7)  

Maybe you are looking for