How to know when a diectory I am trying to copy files to is full?

My Java application archives alot of files......eventually the archive drive will sometimes get full. To deal with this problem, we have a few other drives that the archive can "spill over" into when a drive becomes full. How in Java can I detect when a directory I am trying to write to becomes, or is close to being full, so I can then have the files written to another drive?
Thanks guys.

I have not tried this but...
Run a test that writes to a small disc until it is full and look at the exception that is thrown (using printStackTrace()).
1. If a specific exception is thrown, great, check for that exception (I do not think this is the case).
2. If IOException (or some other general exception) is thrown you may be able to tell the cause from the error message (use getMessage()). There is always the chance that this message could change so you may want to search the string for some key words.
If you search the forum you will find other discussions on this.
Here is one:
http://forum.java.sun.com/thread.jsp?forum=31&thread=281865

Similar Messages

  • I'm a Microsoft Outlook for Mac user, I need information of how to know when e-mail was readed and confirm receipt of e-mails sent. thank you!  regards Mauricio

    I'm a Microsoft Outlook for Mac user, I need information of how to know when e-mail was readed and confirm receipt of e-mails sent. thank you!  regards Mauricio

    Mail and Address book

  • How to know when the PRICE AFTER DISCOUNT changed and get the value

    Hi,
    Everything I do to see if a value changed in the grid works except for PRICE AFTER DISCOUNT
    which seems to be inaccessible.
    Any idea how to know when exactly this value changed and do actions accordinly ?
    Also I always get 0.00 if I try to get the value of it
    This works to get in the condition of a vlaue changing but I always get 0.00 as the value of the column
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_DISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_DISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
        catch (Exception ex)
            SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    And this do not even get into the condition even tought I SEE the column PRICE AFTER DISCOUNT:
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_PRICEAFTERDISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_PRICEAFTERDISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Price after discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
         catch (Exception ex)
             SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");

    just idea, maybe it will works
    Create one udf in row level and set there FS based on changes on price after discount and fill value what is in price after discount. Then the validation make on this field instead of standard SAP field.

  • How i know when a EXECUTE_QUERY retrieved last record

    Hi...
    How i know when the EXECUTE QUERY retrieved the last record in a block ....?
    Exist a trigger after trigger POST-QUERY?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

    Kevin, sorry
    But the :system.last_record not change the value during the execution of EXECUTE_QUERY.
    Only useful when the data was retrieved into blocks...not during..
    Other mode?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

  • How to know when invoke bytecode implements?

    I've got a classfile - it has few invokeinterface bytecodes inside - their count is defined dynamically - when class is running.
    And I've got a program, which runs this class.
    The aim of this program - to gather statistics of invokeinterface calling frequency.
    How to know when invokeinterface bytecode implements?
    (In that moment I plan to update several digits)
    Have You got an advise for me?
    Thanks.

    You must use the debugging interface, or get a code profiler. Do a search on all forums for profiler, you'll get tons of information.

  • How to know when I'm doing a createInsert?

    how to know when I'm doing a createInsert, this to hide a button when you run this action, I am using a task flow.
    my version of jdeveloper is 12c

    hi,
      So you are using the createInsert as a method call in task flow. That is your form/table will be come new rows and you want to disable some button.
    Your task flow might be as below
          CreateInsert---->Page.
    To do so
    1.) Take properties of your method call and bind the Method property to a method in a bean (bean registered in the task flow with scope view or any higher scope)
    2) Call the create insert operation programmatically in that method.
    3) And in that method after the createinsert ,set a boolean variable in pageFlowScope.
    4)Put this variable in the disable property or visible propery of the button you wabt to hide/diable.
    eg:
        public void doCreateInserOperation(){
            try {
               // Programatically invoke CreateInsert
                DCBindingContainer bindings = (DCBindingContainer)getBindingContainer();
                bindings.getOperationBinding("CreateInsert").execute();
            //Set a variable in page Flow Scope 
            AdfFacesContext.getCurrentInstance().getPageFlowScope().put("disableButton", true)
            } catch (Exception e) {
                e.printStackTrace();
        public BindingContainer getBindingContainer() {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings}", Object.class);
            return (BindingContainer)valueExp.getValue(elContext);
    you can access this variable in EL expression as #{pageFlowScope.disableButton}. So when your page render it will be in CreateInsert mode and the button will be disabled/hidden.
    I hope this will help you.
    With regards,
    Gijith.

  • HT2173 How to know when a hard drive has failed ?

    How to know when a hard drive has failed ?

    Machine doesn't boot.  You experience strange crashes.  Gets wrong results.  Your harddrive is five or more years old.  Time to consider repacing it.   You do have backup?
    You may want to run these "standard" fixes if the problem persists.
    1) Check the amount of free space on your harddrive.  You should have a several gigs free.
    2) You should run disk utility
         a) verify the disk
         b) update your permissions.
    3) Try a safe boot.
        Shutdown your machine.  Hold down the shift key.  Poweron.  Wait awhile Wait awhile while you harddrive
          is being checked.
        http://support.apple.com/kb/ht1455
    4) You may want to run applejack to clean up your machine.
         http://applejack.sourceforge.net/
    a lot more ways to fix your Mac.
    http://www.thexlab.com/faqs/faqs.html
    verify & repair your startup drive
    To verify & repair you file system on the startup drive, you will need to run disk utility from you installation DVD.
    This article  will tell you how to get to disk utility.  Once in a disk utility, you can go and attempt to recover the disk.
    http://support.apple.com/kb/TS1417
    To repair your startup drive, you will need to run disk utility from your startup DVD.
    Mac OS X 10.4: About the utilities available on the Mac OS X 10.4 Install DVD
    http://support.apple.com/kb/HT2055
    How to run disk utility from your startup DVD.
    Insert your  startup DVD  into your reader.  Power down your machine.  Hold down to the c key.  Power on your machine.  This will bootup your startup DVD.
    This will bring you to a panel asking you for your language.  Pick your language.
    You you come to the Install Mac OS panel.  Do not install.
    Click on Utilities menu item.  This will give you a pulldown list of utilities.
    Click on the disk utility.
    You are now in disk utility.  Pick your disk.  Click on repair it should be on the lower right of the panel.
    Once the repair completes successfully, you should update your permissions.
    Verify a disk
    As an alternative, you can verify that the filesystem on the disk is correct. You will not be able to repair the file system.
    I suggest that you use disk utility to verify that your startup disk is OK. 
    Macintosh-HD -> Applications -> Utilities -> Disk Utility 
    Start up disk utility.  On the left pane view, you will see a list of all your disks.  
    Click on your startup disk.
    Click on the First Aid  Tab.
    Click on verify.  
    Hopefully your disk will verify.  If not, you have to boot from your installation DVD and run Disk Utility from there to attempt to repair your file-system.

  • How to know when the JComboBox popup is about to show or hide?

    Hi all,
    In JDK 1.4, a new addPopupMenuListener() was added to the JComboBox component. I found out I have to use JDK 1.3, but I already wrote a lot of code around this particular capability. I am trying to figure out how to duplicate it in JDK 1.3. I need to know BEFORE and AFTER the popup is displayed. OR, is there a way with JDK 1.3 that as soon as they click the combo box, it fires an event. The thing is, as soon as they click it, I want to change the background color. When they are done selecting, I can use an ActionListener or ItemListener to find out what was selected and change the color again. My killer is trying to figure out how to know when they have selected the box. I tried adding MouseListener, PropertyChangeListener, AncestorListener. None are doing a thing when the JComboBox is first selected.
    Any help would be much appreciated.
    Thank you.

    Hi all,
    In JDK 1.4, a new addPopupMenuListener() was added to the JComboBox component. I found out I have to use JDK 1.3, but I already wrote a lot of code around this particular capability. I am trying to figure out how to duplicate it in JDK 1.3. I need to know BEFORE and AFTER the popup is displayed. OR, is there a way with JDK 1.3 that as soon as they click the combo box, it fires an event. The thing is, as soon as they click it, I want to change the background color. When they are done selecting, I can use an ActionListener or ItemListener to find out what was selected and change the color again. My killer is trying to figure out how to know when they have selected the box. I tried adding MouseListener, PropertyChangeListener, AncestorListener. None are doing a thing when the JComboBox is first selected.
    Any help would be much appreciated.
    Thank you.

  • How to know whether the current database is using a password file or not?

    How to know whether the current database is using a password file or not?

    The remote_password_file is the parameter that determines if you can use or not a password file. The values this parameter can have are NONE, SHARED, EXCLUSIVE. It is pretty obvious, if it is set to either SHARED or EXCLUSIVE the oracle instance has enabled the access through a password file for the SYSDBA and SYSOPER roles.
    ~ Madrid

  • Anyone knows when will Lightroom be able to open Raw files from the new Nikon D810? Thanks.

    Anyone knows when will Lightroom be able to open Raw files from the new Nikon D810 camera? Thanks.

    Just posted to Lightroom Journal Lightroom Journal | Tips and advice straight from the Lightroom team. It's not Lightroom, but does address the original question. Definitely worth a look, sooner rather than later.
    Adobe Photoshop Camera Raw 8.6 RC for CC and CC 2014 Release Candidate | digital camera raw file support - Adobe Labs
    I expect Lightroom will follow in due course, but have not ETA

  • Build error Caught IOException when trying to copy files

    Hello,
    Sometimes when I build a BPM project in NWDS I get this error,
    Caught IOException "C:\NWDSWS.jdi\LocalDevelopment\MINSUR_BPM\demo.com\bpm_hrsolpos_v2\_comp\gen\default\public\def_cmp\lib\moin\demo.combpm_hrsolpos_v2def_cmp.zip (the process doesn't have acces to the archive because it's been used by another process)" when trying to copy files from "C:\NWDSWS.jdi\LocalDevelopment\t2\CAC172530F2EFDDCD642AFD09DBA1782\default\" to "C:\NWDSWS.jdi\LocalDevelopment\COMP_BPM\demo.com\bpm_hrsolpos_v2\_comp\gen\default\"
    Anyone knows how to solve this?
    Regards
    SU

    Hi
    I had the same problem.
    Just if other get the same issue
    I solved it by logging of the computer with NWDS and logon again.
    Daniel

  • Error -50 when trying to copy files to external hard drive.

    When trying to copy files (itunes music folder) to an external hard drive, I get the following message: Copying music failed. An unknown error occurred (-50).
    I have tried repairing disk permissions but still get the message. Any thoughts?

    Gary,
    A couple of posts referencing "error -50" seem to indicate that the error could result from a corrupted file.
    One from Kappy follows:
    Error -50 Post
    One way you could save your music to the other drive would be to do it folder by folder (dragging each artist's folder, to the other drive). I suspect you won't have many (if any) errors doing that, and if you hit the corrupted file, you can come back to that folder and see which one is bad. You could also try to drag groups of artists folders to the drive if you had quite a few. One note: If you save your files this way, you won't be saving the library, which contains all the playlists you've created...you'll have to recreate them.
    If you needed that music down the road, you could just do a File>Import from iTunes....
    Hope this helps,
    Bob

  • Error message when trying to copy files from memory stick to MacBookPro

    Trying to copy files from my memory stick to my MacBookPro and have started to get a crazy error message - "Attempting to copy to the disk Macintosh HD failed. You do not have enough access privileges for this operation."
    I've never had a problem before today. Any help will be welcomed!

    Try this. When the stick is mounted on your desktop, right click "Get Info" and at the bottom choose "ignore ownership on this drive." See if that works.
    Bryan

  • My Iphnoe 4 was stolen, what can i do?, how to know when it's block by IMEI

    I'm travelling across argentina, and a couple of days ago some one stolen my Iphone in my room in KAIXO CENTRAL HOSTEL, (never go there!!!, there is an YHA hostel close to this, and there are security, I learn of my mistakes, later...).
    I want to know when my Iphone it's blocked, any know how to confirm that the phone it's blocked??? , I call to apple support and send all the stuff to block my phone, at least i don't want who some one use it or see my personal data, photo, music...
    when the Iphone it's blocked by IMEI, this device can do anything???
    Thanks in advance.

    If the carrier has blocked the IMEI, all that means is that the iPhone will not be able to connect to the cell network. That does not prevent someone from accessing the data or trying to hack the iPhone to work around the block. If you set a passcode on the screen lock, that makes it more difficult for someone to use the iPhone without erasing your information, but it's not impossible.
    In any case, there's nothing you can do about it now, not unless you set up Find My iPhone and it can locate the iPhone in which case you can let the police know the reported location and, if you wish, wipe the iPhone (note though that if you wipe it, you will get no further location information). Change all passwords to online services you had set up or used from the iPhone.
    Regards.

  • How to know when Windows support files are updated?  (BC 4)

    I have MacBook Pro Retina w/Lion (of course), installed Win 7 Pro 64-bit, using Boot Camp procedures and files that were issued June 14.  My BootCamp Assistant says it's 4.0.4.
    My question is:  how do I know when the Windows Support files (drivers) are updated by Apple?  I would have expected an update by now, but I just went into Boot Camp Assistant on Lion, re-downloaded the drivers, and I *think* they are all dated June 14th still.  (looked in WindowsSupport folder which is where it said it downloaded them)
    There doesn't seem to be a reasonable way to get notified if there are new drivers or not.
    My expectation was that I could run *something* either on the Windows or OS X side, and it would *tell me* that drivers needed updating, or at least say "you are running version X".
    It can't be that I have to re-download the drivers and check the dates on all the files every time I'm curious if there's updates available.  Can it?
    The files seem to be on some mysterious Apple server and the only thing I can do to that server is ask to download the support files.  No query, no "is an update available", ... ???
    It's not even clear to me that the Windows Support files have a version number. 

    When the next revsion of OS X you can run Boot Camp Assistant again, or of course once 10.8 though might want to just sit tight, you would likely see reports in forums and elsewhere.
    Apple Software Update for Windows use to but no longer.
    The easiest way to see device driver version, chipset and more is with AIDA64
    http://www.aida64.com/product/aida64-extreme-edition/overview

Maybe you are looking for

  • Xy graph look different after Stop

    Hi, my xy graph looks in the .jpg and after stopping the program different... check atachment... I probably need some prooperty nodes... but I cannot figure is out, which one.. thanks Ugur Attachments: xy graph issue.doc ‏336 KB

  • Aperture 3.03 Adjustment bricks suddenly disappear

    In full screen mode I will see a histogram, but the space under adjustments is blank. So far I have been able to return to view mode. The space is still blank, no bricks showing, but I can pull down adjustments and click on any brush. The adjustment

  • Can i follow an object?

    hi all, i would like to find a way to follow an object through all the methods it is passed as a parameter. for example if i have this: public static void method() Object o = new Object(); methodA(o, "another parameter"); methodB("another_parameter",

  • My Most Visited List is empty and remains so, no matter how often I visit the same websites

    This has only happened since I updated to Firefox 4.0. I go to the same sites repeatedly, and so far none of them show up in the Most Visited dropdown list.

  • Windows 7 vs Sound Blaster Live! Digital - Support Please !!!!

    Hello, i recently installed windows 7 and love the new look, but new looks mean nothing when you got no sound lol!, i've had the sound Blaster Li've! Digital for a while and i've looked everywhere for a driver to get my sound card working on windows