Getting file system drives

Hi,
I would like to get hold of all the drives on the system for navigation like a:\, c:\...etc. Basically a JFileChooser but without the GUI.
I have looked up File, FileChooser and various sytem properties but none of these seem to apply. I also took a peek at JTree (kind of hoping a 'ready-made' class for a navigation tree already existed) but nope. I suspect this is due to the different management by OS's but isn't there some sort of 'getMountedPartitions()' method ?
Shall I have to write native code ?
Any suggestions/ideas are more than welcome,
BadLands

java.io.File
listRoots
public static File[] listRoots()List the available filesystem roots.
A particular Java platform may support zero or more hierarchically-organized file systems. Each file system has a root directory from which all other files in that file system can be reached. Windows platforms, for example, have a root directory for each active drive; UNIX platforms have a single root directory, namely "/". The set of available filesystem roots is affected by various system-level operations such the insertion or ejection of removable media and the disconnecting or unmounting of physical or virtual disk drives.

Similar Messages

  • Filters Won't Work in CS3 - Get "file system I/O error" message

    Using CS3 on Mac G5, OS 10.4, and some Photoshop filters (e.g. Liquify) won't open, getting the message: "A file system I/O error has occurred."
    Some filters do open, but others fail.
    Have tried reinstalling CS3, trashing preferences, unlocked permissions - no help.
    Any suggestions?

    Peter,
    The very instant you create a new document or open an existing image file, Photoshop creates a Scratch Disk to use as virtual memory, regardless of how much RAM you have installed. This scratch disk is created on whichever drive you have designated as your PRIMARY disk drive. If it happens to be on your boot drive, i.e. the drive where your OS (Operating System) resides, it will be competing with the OS swap file for use of the one read head on that disk. Very bad for performance.
    Ideally, it should be a dedicated, separate internal hard drive, Figure on at least 35 times or more the size of your largest file for scratch. I keep a dedicated 160GB internal drive as my primary scratch disk.
    You should not be running a G5 with less than 4GB of installed RAM. 512 MB would be ludicrous, but even 1GB is pathetic little RAM.
    I agree that your hard drive sounds like it's going south. Get two new, large hard drives, at least 250GB each.

  • Getting file system name

    Is it possible to get a File's partition file system name .
    I mean like "FAT32" or "NTFS".
    thx
    R0mai

    Because I'm developing an installer for a linux live-cd and it's bootloader : (syslinux) is not working on FAT32 file system, and I want to warn the user that it will not work.
    If anybody can help to make syslinux work with FAT32, that would be also good for me.
    R0mai

  • How can I getting the system drives list?

    Hello again. I'd like to create a dropdown list with the computer's drives, so you can easily change from one to another without using a "selectDialog" File object. Is it possible?
    Thanks beforehand :)

    Its something I havn't tried.
    On a PC you might be able to use VB/VBS to get the file list, put them in an env so that you can read them from Javascript.
    Here is a bit of code found on the net.
    Set FileSystemObject = CreateObject("Scripting.FileSystemObject")
    Set Drives = FileSystemObject.Drives
    For Each DiskDrive in Drives
    DriveLetter = DiskDrive.DriveLetter
    DriveType = DiskDrive.DriveType
    Select Case DriveType
    Case "0" DriveType = "Unknown type of drive"
    Case "1" DriveType = "Removable drive"
    Case "2" DriveType = "Fixed drive"
    Case "3" DriveType = "Network drive"
    Case "4" DriveType = "CD-ROM drive"
    Case "5" DriveType = "RAM Disk"
    End Select
    WScript.Echo "Drive " & DriveLetter & " is a " & DriveType
    Next
    Set Drives = nothing
    Set FileSystemObject = nothing

  • How to get Operating System Space Info from Oracle database using SQL

    Our oracle databases are installed on Unix operating system. Currently our DBA wrote a view to get space info of table spaces and He is requesting me to add Operating system level(file system) drive space info to the same report.
    Can you please let me know the easiest way to get this information to sql table so that it can be used for reporting purposes?

    You should be able to create a shell script with the OS commands to generate the information for the mount points that you want to access in Oracle, then read it in as an external table using the preprocessor feature of external tables:
    http://download.oracle.com/otndocs/products/database/enterprise_edition/utilities/pdf/xtables_preproc11g_1009.pdf

  • A corruption was discovered in the file system structure on volume Windows

    This morning, turned on the laptop and have several instances of this error in the event viewer. Here are the details:
    <script>// function f(e){ if (e.className=="ci"){if (e.children(0).innerText.indexOf("\n")>0) fix(e,"cb");} if (e.className=="di"){if (e.children(0).innerText.indexOf("\n")>0) fix(e,"db");} e.id=""; } function fix(e,cl){ e.className=cl; e.style.display="block"; j=e.parentElement.children(0); j.className="c"; k=j.children(0); k.style.visibility="visible"; k.href="#"; } function ch(e){ mark=e.children(0).children(0); if (mark.innerText=="+"){ mark.innerText="-"; for (var i=1;i<e.children.length;i++) e.children(i).style.display="block"; } else if (mark.innerText=="-"){ mark.innerText="+"; for (var i=1;i<e.children.length;i++) e.children(i).style.display="none"; }} function ch2(e){ mark=e.children(0).children(0); contents=e.children(1); if (mark.innerText=="+"){ mark.innerText="-"; if (contents.className=="db"||contents.className=="cb") contents.style.display="block"; else contents.style.display="inline"; } else if (mark.innerText=="-"){ mark.innerText="+"; contents.style.display="none"; }} function cl(){ e=window.event.srcElement; if (e.className!="c"){e=e.parentElement;if (e.className!="c"){return;}} e=e.parentElement; if (e.className=="e") ch(e); if (e.className=="k") ch2(e); } function ex(){} function h(){window.status=" ";} document.onclick=cl; // </script>
    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="Ntfs" Guid=" />
      <EventID>55</EventID>
      <Version>0</Version>
      <Level>2</Level>
      <Task>0</Task>
      <Opcode>0</Opcode>
      <Keywords>0x8000000000000000</Keywords>
      <TimeCreated SystemTime="2014-12-26T14:26:46.034431300Z" />
      <EventRecordID>4751</EventRecordID>
      <Correlation />
      <Execution ProcessID="4" ThreadID="196" />
      <Channel>System</Channel>
      <Computer>
      <Security UserID
      </System>
    - <EventData>
      <Data Name="DriveName">Windows</Data>
      <Data Name="DeviceName">\Device\HarddiskVolumeShadowCopy5</Data>
      <Data Name="CorruptionState">0x0</Data>
      <Data Name="HeaderFlags">0x2</Data>
      <Data Name="Severity">Normal</Data>
      <Data Name="Origin">File System Driver</Data>
      <Data Name="Verb">Force Proactive Scan</Data>
      <Data Name="Description">The exact nature of the corruption is unknown. The file system structures need to be scanned online.</Data>
      <Data Name="Signature">0xe2b3f0fb</Data>
      <Data Name="Outcome">Pseudo Verb</Data>
      <Data Name="SampleLength">0</Data>
      <Data Name="SampleData" />
      <Data Name="SourceFile">0x17</Data>
      <Data Name="SourceLine">193</Data>
      <Data Name="SourceTag">137</Data>
      <Data Name="CallStack">Ntfs+0xd88db, Ntfs+0xc0988, Ntfs+0xec781, Ntfs+0xbbef2, Ntfs+0xbc5e3, Ntfs+0xf50bb, Ntfs+0xf007d, Ntfs+0xefd53, Ntfs+0xeff5a, fltmgr+0x2d1f6, fltmgr+0x2d51b, fltmgr+0x68dc, fltmgr+0x8e10, mfehidk+0x60698, mfehidk+0x61676, mfehidk+0x61a9e, mfehidk+0x62b06, fltmgr+0x228a, fltmgr+0x37bc, fltmgr+0x192e, fltmgr+0x109e, ntoskrnl+0x3c8784, ntoskrnl+0x3eec10, ntoskrnl+0x6469f, ntoskrnl+0x433376, ntoskrnl+0x118ac4, ntoskrnl+0x136925, ntoskrnl+0xfee70, ntoskrnl+0x1557c6</Data>
      </EventData>
      </Event>

    @shl1024 ,
    Hello and thank you for posting back with the screen shot. 
    Now if you can boot into your system and get to the desktop.  Back up all your files you do not want to loose.
    Once this is done.  You will want to enter the system BIOS. You should be able to access the BIOS by tapping the F10 key as soon as you see the HP welcome screen. Once you are in the BIOS you will want to run a hard drive test.
    Testing a Hard Disk from the BIOS
    You will want to do this to make sure the hard drive is still in good shape.  If it comes up with a bunch of issues in this test.  Replace.
    If not run other hard drive tests.
    HP Notebook PCs - Testing a Hard Disk using the Built in Self Test
    Now if this finds issues then if you have everything backed up you may be able to run the Windows system recovery to put it back to the way it was out of the box.
    You may just ran into an issue with corrupted data in the system file and the system is unable to read.
    Here is a link to help you with the Windows System Recovery.
    Performing an HP system recovery (Windows 8)
    Let me know how things go and have a great day.
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    D5GR
    I work on behalf of HP

  • Find system drives with JDK 1.1.8

    hello,
    i cannot use the listRoots() function in order to get the system drives because i am working with JDK 1.1.8 and in this this jdk i didn't find any simple function to do so..
    does someone know how to get the system drives with this jdk (1.1.8)???
    please... :-(

    This would be a lot better in 1.2, but this should work in 1.0+
    public class FileRoot {
         public static void main(String[] args) {
              File f = new File(args[0]);
              File root = getRootOfDrive(new File(f.getAbsolutePath()));
              System.out.println("The Root is:"+root);
         private static File getRootOfDrive(File f) {
              String parent = f.getParent();
              System.out.println(parent);
              return (parent == null)? f : getRootOfDrive(new File(parent));
    }

  • File System (formatting, partitioning)

    I have a question about the HFS+ (HFS Plus) file system...
    I recently purchased a 17 inch Macbook Pro along with a LaCie d2 Extreme External Hard Drive. I am dual-booting on my Macbook Pro using Bootcamp and want to be able to use the external hard drive in both work environments and also be able to access files from each OS. What would be the best and most reliable way to go about doing this.
    I was going to format the entire drive as FAT32 since both operating systems can write and read to this file system... but I wanted other opinions on this. Should I partition the drive and have an NTFS partition for Windows XP, a FAT32 partition for both OSes and an HFS+ partition for Mac OSX??
    All help is greatly appreciated.

    "So, if I understand correctly, Mac Drive would allow me to read and write to an HFS+ volume from both Windows XP and Mac OSX."
    Yes and no. MacDrive is a file system driver for Windows. Mac OS X supports HFS+ natively.
    "Therefore, I would not have to partition the drive at all and I could have the whole drive formatted as HFS+??"
    Nope. Windows XP needs a FAT32 or NTFS drive to boot from, MacDrive will be loaded during the boot process.
    "How does Mac Drive work... do I install it on XP?"
    Yep. After you installed it, you can see any HFS+ partition in the Windows Explorer as a separate drive.
    "Also, does it slow down the drive at all or require emulation or anything like that?"
    No.

  • ASM Vs File System - Who is best, Why and How ..

    How the ASM is better than traditional file system ..? What is the reason behind oracle recommends ASM when we can achieve the same performance in traditional file system ...? Can some one throw some lights on this to understand the purpose of ASM in a better ways when comparing traditional file system.

    ASM is better for two basic reasons.
    Management and administration. It allows the DBA far better control, with features not found, when using a cooked file system. For example - you need to move the database from an old drive to a newly installed drive on the server. With ASM you can do this while the database is up, running and in-use.
    Performance. ASM disks are block devices that are accessed using direct I/O. This bypasses a lot of moving parts that you will typically find in a cooked file system. Raw/direct disk I/O is faster than doing I/O via a kernel file system driver (that may or may not write that data to file on disk).
    The con is that ASM is another s/w layer that needs to be installed, and which needs server resources to run. On the modern server, that is not a problem. It's not like running on a couple of sub Ghz CPUs with only 4Gb of system RAM. PCs today have more resources and faster resources than servers of a decade ago.
    So there is not much reason for not using ASM.
    I'm using ASM on all my database servers. From very small (dual core standalone) to large (12 node RAC). ASM has numerous times saved the proverbial day when there was storage issues, and required storage changes. I would need a lot of sound and hard convincing not to use ASM by default for an Oracle database in today's environment.

  • Why would anyone want to use ASM Clustered File system?

    DB Version: 11gR2
    OS : Solaris, AIX, HP-UX
    I've read about the new feature ACFS.
    http://www.oracle-base.com/articles/11g/ACFS_11gR2.php
    But why would anyone want to store database binaries in a separate Filesystem created by Oracle?

    Hi Vitamind,
    how do these binaries interact with the CPU when they want something to be done?
    ACFS should work with Local OS (Solaris) to communicate with the CPU . Isn't this kind of double work?ACFS dont work with .... but provide filesystem to Local S.O
    There may be extra work, but that's because there are more resources that a common filesystem.
    Oracle ACFS executes on operating system platforms as a native file system technology supporting native operating system file system application programming interfaces (APIs).
    ACFS is a general purpose POSIX compliant cluster file system. Being POSIX compliant, all operating system utilities we use with ext3 and other file systems can also be used with Oracle ACFS given it belongs to the same family of related standards.
    ACFS Driver Model
    An Oracle ACFS file system is installed as a dynamically loadable vendor operating system (OS) file system driver and tool set that is developed for each supported operating system platform. The driver is implemented as a Virtual File System (VFS) and processes all file and directory operations directed to a specific file system.
    It makes sense you use the ACFS if you use some of the features below:
    • Oracle RAC / RAC ONE NODE
    • Oracle ACFS Snapshots
    • Oracle ASM Dynamic Volume Manager
    • Cluster Filesystem for regular files
    ACFS Use Cases
    • Shared Oracle DB home
    • Other “file system” data
    • External tables, data loads, data extracts
    • BFILES and other data customer chooses not to store in db
    • Log files (consolidates access)
    • Test environments
    • Copy back a previous snapshot after testing
    • Backups
    • Snapshot file system for point-intime backups
    • General purpose local or cluster file system
    • Leverage ASM manageability
    Note : Oracle ACFS file systems cannot be used for an Oracle base directory or an Oracle grid infrastructure home that contains the software for Oracle Clusterware, Oracle ASM, Oracle ACFS, and Oracle ADVM components.
    Regards,
    Levi Pereira

  • What is the best way to copy aperture library on to external hard drive? I am getting a message that say's "There was an error opening the database. The library could not be opened because the file system of the library's volume is unsupported".

    What is the best way to copy aperture library on to external hard drive? I am getting a message that say's "There was an error opening the database. The library could not be opened because the file system of the library's volume is unsupported". What does that mean? I am trying to drag libraries (with metadata) to external HD...wondering what the best way to do that is?

    Kirby Krieger wrote:
    Hi Shane.  Not much in the way of thoughts - - but fwiw:
    How is the drive attached?
    Can you open large files on the drive with other programs?
    Are you running any drive compression or acceleration programs (some drives arrive with these installed)?
    Can you reformat the drive and try again?
    Hi Kirby,
    I attached the UltraMax Plus with a USB cable. The UltraMax powers the cable so power is not an issue. I can open other files. Also, there is 500GB of files on the drive so I cannot re-format it. Although, I noted I could import the entire Aperture Library. However, I do not want to create a duplicate on my machine because that would be defeating the purpose of the external drive.
    Thanks,
    Shane

  • How to get list of drives present in local file system?

    Hi all,
    I want to show all drives and their contents using JTree.
    Does anybody know how to get list of drives present in local file system?

    Thank you!
    I have new question.
    I want to disply size and file type. Can you give ur suggestion in order to do that?
    I want to provide following using JTree
    + root <Dir> 50KB
    - file1 <txt> 10KB
    - file2 <bmp> 20KB
    + root2 <Dir> 200KB
    -file1 <jpeg> 50KB
    Is this possible?
    Plz reply..........
    bye

  • Trying to make a iPhoto Library on my external hard drive but I get "the library could not be opened because the file system of the library's volume is unsupported.

    Trying to make a iPhoto Library on my external hard drive but I get "the library could not be opened because the file system of the library's volume is unsupported."  I reformatted my hard drive to ExFAT because I want to be able to use it on PC and MAC.
    iOS: 10.10.1
    Mac Book Air
    External: WD 500 GB recently reformatted (no files on it currently)

    The iPhoto library must only be on a volume formatted Mac OS extended (journaled) - it can not be on any other format drive
    LN

  • How can I get "all my files" to recognize files in a non system drive?

    I use a Mac Pro with four internal drives, OSX 9.2. My system drive is an SSD so I keep user files on another drive in an adjacent bay.
    Files in my non-system disc are not displayed in the "all my files" finder view. If I copy a file from the system disc to my user disc, the copy is not recognized, and when I trash the original, of course, there is no reference to either. If I search, spotlight finds it. This behavior seems to apply to all files and is regardless of anything selected in the sidebar before "all my files". I have not marked any files, folders or drives as private. I presume I must have a set a pref wrong. I would really appreciate any advice.
    Thank you.

    To change the program that .indd files default to when opened in OSX, right click on the .indd file > Open With > Other.
    Then navigate to the version of InDesign that you want to open them with (I have CS6 installed but its the same for CS5). Make sure you have "Always Open With" selected.

  • Crystal Reports XI String [255] limit with the File System Data driver...

    I was trying to create a Crystal Reports XI report to return security permissions of files and folders.  I have been able to successfully connect and return data using the File System Data driver as the Data Source; however the String limit on the ACL NT Security Field is 255 characters.  The full string of data to be returned can be much longer than the 255 limit and I cannot find how to manipulate that parameter. 
    I am currently on Crystals XI and Crystal XI R2 and have applied the latest service packs but still see the issue.  My Crystal Reports Database DLL for File System data ( crdb_FileSystem.dll ) is at Product Version 11.5.10.1263.
    Is it possible to change string limits when using the File System Data driver as the Data Source?  If so, how can that be accomplished.  If not, is there another method to retrieve information with the Windows File System Data being the Data Source?  Meaning, could I reach my end game objective of reporting on the Windows ACL's with Crystal through another method?

    Hello,
    This is a known issue. Early versions you could not create folder structures longer than 255 characters. With the updates to the various OS's this is now possible but CR did not allocate the same space required.
    It's been tracked as an enhancement - ADAPT01174519 but set for a future release.
    There are likely other ways of getting the info and then putting it into an Excel file format and using that as the data source.
    I did a Google search and found this option: http://www.tomshardware.com/forum/16772-45-display-explorer-folders-tree-structure-export-excel
    There are tools out there to do this kind of thing....
    Thank you
    Don
    Note the reference to msls.exe appears to be a trojan: http://www.greatis.com/appdata/d/m/msls.exe.htm so don't install it.
    Edited by: Don Williams on Mar 19, 2010 8:45 AM

Maybe you are looking for

  • HT201401 can see thumbnails, but can't see pictures when I tap the thumbnail

    On the iphone 4 I can see the thumbnail in the camera roll, but I can't see the picture when I tap on the thumbnail.

  • Grouping of measures in a range

    Hello - I want to create a report in 11g such that if the report looks like this:   Region   District   Market   Sales   Eastern   Region   YoungsTown   District   YoungsTown   10   Eastern   Region   New   York District   New   York   12   Central  

  • Display image based on conditions.

    Hi every one. We have to display image (circle) based on three conditions. Example; if employee is < 1000 small circle, if salary is > 1000 and < 10000 medium size circle and >10000 big size circle. And second condition if employee location is East c

  • Secure remote login in scripts

    Hello, I stated this same question to also metalink discussion forum, so I'm cross posting a bit here. Sorry about that. I have a following business problem: I have two Solaris servers where in first (DBS-node) I have the database. In the other one (

  • Widgets Freeze in Leopard

    All my widgets worked in Tiger, but in Leopard they freeze. When I first open Dashboard all the widgets work fine, but when I hide the Dashboard, then open it again, all the widgets are frozen. When I open Activity Monitor and force quit the Dashboar