Renaming a file, while still having a handle to it

hi,
on my computer i have an application that writes a file, then moves it to another directory.
my application reads the file as its being written by the first application.
however when the first application moves the file to another directory i cant read it any more in windows (IOException), in linux its ok.
in c i can change a flag in the handle indicating that the file is valid and then keep on reading.
is there any thing like it in java as well?
how could i keep on using the file stream after the file is renamed?

This is a fundamental difference between Windows, OS/2 (if I recall) and similar OS's and Unix-like OS's. You can't do exactly what you are trying to do in Windows OS's. You need to come up with another approach that does not rely on the i-node behavior of the Unix file systems.
Chuck

Similar Messages

  • HT4914 Once I turn on Match, how do I remove the songs from my iPhone, thus freeing up the memory, which is my initial purpose anyway? (while still having instant access to all my music)

    Once I turn on Match, how do I remove the songs form my iPhone, thus freeing up the memory, which is my initial purpose anywhy (while still having complete instant access to all my music) ?

    Hello there dwflemming1,
    I recommend turning off iTunes Match on the computer and the phone. Then connect the phone to the computer and uncheck the box to sync music, then click apply in the lower right corner of iTunes. When that completes, turn match back on on both devices.
    iOS: Syncing with iTunes
    http://support.apple.com/kb/HT1386
    And just in case, iTunes: How to add a computer or iOS device to iTunes Match
    http://support.apple.com/kb/ht4913.
    Cheers,
    Sterling

  • IPhone 5 shuts down while still having more than 15% battery remaining

    I've been using my iPhone 5 for a while and a few months back it started to shut down when it still had 10% battery remaining.
    I tried to send it to repair while it still had coverage but they told me that my phone was OK and that with the iOS 7 update it would get better. They also told me that it was a normal behavior, and this was supposed to happen if the remaining battery wasn't enough for the phone to operate (e.g. if there was an opened app needing a lot of power). So, since then I always close the apps that I'm not using but this hasn't solved anything.
    Since I updated, the issue has just gotten worse. Now it's shutting down when it has 15%-20% battery.
    Does anyone else has had the same issue?

    Most likely faulty battery. If you have convenient Apple Store, make reservation and then go and ask for free quick battery diagnositic testing. Also refer them to your previous attempt to take care of this while still under Warranty.

  • Rename Files while uploading, having special characters in File Name.

    Hello Forum,
    In our SharePoint environment, we are having many document library. Our users regularly uploads files to the documents library. As SharePoint doesn't allow to use "&"  character in file name, it'll throw an exception regarding the file
    name.
    Now what I needed is :
    Is there any way to remove "&" character while uploading files? Can we replace "&" with any other character while uploading files.
    If is there any paid solution available, leave comment.
    Thanks in Advance.

    You have to change the folder/file names before hand then upload them to Sharepoint.
    here is the script which will scan the files/folder and find the special charaters and fix for you.
    http://get-spscripts.com/2011/11/use-powershell-to-check-for-illegal.html
    Courtesy :Waqas
    Sarwar(MCSE 2013)
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Pages deleting content of file while still editing

    Is it possible that pages/mac could delete the content of the file without asking for permissions, Im working on a file then all of a sudden it won't save or let me edit it. Its working with other documents but not this one in particular, am I doing something wrong? Its using the latest Mavericks update
    Model Name: MacBook Pro
      Model Identifier: MacBookPro11,2
      Processor Name: Intel Core i7
      Processor Speed: 2 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 6 MB
      Memory: 8 GB
      Boot ROM Version: MBP112.0138.B02
      SMC Version (system): 2.18f6

    Please be exact unless you expect an equally vague and slow response:
    Menu > Pages > About Pages
    Have you actually closed and saved the document before encountering the problem?
    What exactly is happening? Try and describe it with the knowledge that we can not see what you are doing.
    Peter

  • How do you change the theme of your macbook pro while still having lion?

    I would like to have it look like the old 10.4 look. Any suggestions?

    I want the old 10.4 look of the old macbook. In windows they had options where you can choose either the vista view or the classic windows look, etc. I was wondering if MacBook Pro had that feature where even though you have updated software such as Lion, you can still retain the same look your desktop had when you had the 10.4 version.

  • I have a MiFi 4510L and it is erratically going dormant while still having a green light.

    Have to reboot to run again. Will the card out of this unit work on any other WiFi units or do I have to buy another 4510L?

    Dormancy is a feature that is built into all Jetpack devices.  It is not a defect that needs to be corrected, rather it is an indication that something may be wrong with your actual connection with the towers.  All devices will go dormant after a device stops sending or receiving data for a determined amount of time.  Devices will go in and out of dormancy as frequently as is needed so long as the Jetpack is performing like normal.
    The green light is a status tool similar to the dormancy status message.  When the LED light is steady green on certain models that means there is no data being transferred.  Once data starts transferring again the LED should blink Green accordingly.  This should be the case for early MiFi 4510L models.  The later models I believe constantly blink Green and the LED is not as helpful for troubleshooting.
    The SIM on a MiFi 4510L is a normal full sized SIM and can be swapped with other Jetpacks of the same kind.  You need to be careful not to consider swapping with a Jetpack that uses a Micro SIM card such as the 4620L.
    Again, dormancy is normal and expected with all Jetpack models.  You should be taking proper precautions and making a habit out of powering down your MiFi when it is not in use.  This will help keep your signal with the local towers fresh and active when you actually need to use it. 

  • Phone turns off while still having battery

    I have noticed that when I have like 15% of bat and I take a picture, my phone will turn off as of the battery is empty. It won't turn back on until I connect it to the charger. It will than turn on immediately and showing the same 15%. Is it a software issue? It has happened a few times already!
    Has anyone experienced the same? 

    I would suggest you to restore your iPhone using iTunes, once that this seems like a software glitch.
    This article should help you restore your iPhone through iTunes:
    http://support.apple.com/kb/HT1414

  • Rename files while retaining part of camera filename

    Hello, I've just switched from Windows to OS X and I'm running a trial of Aperture. It's great so far, much better than Nikon's own RAW software (Capture NX).
    However, I can't figure out how to rename imported files while also retaining part of the original filename. The images come off of the camera like this:
    DSC_3497.nef
    I want to retain the unique number that the image already has, but reference the camera used, and also prefix a digit to the original numeric string:
    D3X_63497.nef
    In Aperture's "File Naming" dialog, I don't see a way to split the existing filename in this way. It looks like I can only use the full Master File Name. Any suggestions?
    Message was edited by: sempervirent

    I actually found two free applications that do exactly what I need.
    One is a standalone app:
    http://www.macupdate.com/info.php/id/33659/rename
    The other runs as a native Mac service:
    http://www.versiontracker.com/dyn/moreinfo/macosx/75183804
    I'd still prefer to do this directly in Aperture when images are imported, so if anyone has a solution, please let me know.
    Message was edited by: sempervirent

  • Where are the actual files/renaming those files?

    Hi all, I'm a new Mac user at home, and I'm exploring how iPhoto works. Since 1999, I've kept my digital photos straight using a manual method of folders labeled "Year" and inside that "01, 02, etc" and inside that "01 PhotoName" for something that happened on the 1st day of the month (following me?) With iPhoto, I gather this is much easier to manage because iPhoto seems to do all of this for me.
    I'm trying to understand how iPhoto is working. It seems that when I import a photo from my camera, it goes to a folder in "iphoto library"/originals/2007/album name/photoname (in my case, the file name is DSC02447). However, if I make any changes to that file within iPhoto (red eye, color, etc) it will create ANOTHER file in "iphoto library"/MODIFIED/2007/albumname/photoname. So, does that mean it's essentially duplicating my images?
    Also related, how can I rename the actual FILE? When I'm within iPhoto's Photo view, I can rename the title of the image by clicking the name below it, and renaming it to something other than DSC02447. However, in the "photo info" window, you can see the actual filename has NOT changed.
    If I would use iPhoto forever, that wouldn't be a big problem. However, I don't know what photo organizing program I'll be using in 10 years, but if it's not iPhoto, I don't want to be stuck with a whole lot of photos that I spent a bunch of time organizing and renaming within iPhoto, only to realize those changes were only within iPhoto.
    So along with those two questions, does anyone have a website that explains the "inner workings" of iPhoto better than the Apple site? All I can find on here is "here's all the great things iPhoto does" but I can't really find deep tutorials on "this is actually what's happening to your files."
    Many, many thanks everyone.

    Carl
    I'm trying to understand how iPhoto is working. It seems that when I import a photo from my camera, it goes to a folder in "iphoto library"/originals/2007/album name/photoname (in my case, the file name is DSC02447). However, if I make any changes to that file within iPhoto (red eye, color, etc) it will create ANOTHER file in "iphoto library"/MODIFIED/2007/albumname/photoname. So, does that mean it's essentially duplicating my images?
    Duplicating? No, but it is preserving your original file - as a kind of digital negative. Essentially, all operations are carried out on a copy of the file, at any time you can go Photos -> revert to original. In this iPhoto is implementing the best practise of Digital Asset Management.
    If you don't wan that feature, then bluntly, don't use iPhoto. It's hard wired into the application and cannot be turned off. There are various hacks that claim to remove unwanted versions but each of them put the integrity of your library at risk.
    It is strongly advised that you do not move, change or in anyway alter things in the iPhoto Library Folder as this can cause the application to fail and even lead to data loss
    Also related, how can I rename the actual FILE? When I'm within iPhoto's Photo view, I can rename the title of the image by clicking the name below it, and renaming it to something other than DSC02447. However, in the "photo info" window, you can see the actual filename has NOT changed.
    You can't. You can copy the files to the desktop and rename them before import (FileList is pretty good for this) or, if you export them using the File -> Export command you have the opportunity to use your Title as a filename on the exported version. (That's your future proofing, right there - you can also write you keywords to the file too.) But if you rename the files while they are in iPhoto, then you change the path to the files and that brings you to my warning above, about making changes in the iPhoto Library Folder.
    So along with those two questions, does anyone have a website that explains the "inner workings" of iPhoto better than the Apple site? All I can find on here is "here's all the great things iPhoto does" but I can't really find deep tutorials on "this is actually what's happening to your files."
    Here?
    Regards
    TD

  • Sony just isn't helping me. I'm still having trouble transferring my NX3 video files.

    Well, I'm still having trouble transferring my NX3 video files to my editing software.  Sony suggested using the Sony Content Browser but that doesn't work. Sony just can't seem to help me. If the scene shot on the card is longer than 10 minutes, 4 frames of audio is lost from each file.  So if you shoot 60 minutes straight (say a wedding, you loose audio every 10 minutes)  I guess this doesn't sound important, unless it happens just as the bride is saying "Yes" in her vows.
    My original post is as follows:
    Sony NXCAM (NX-3) drops audio tracks when importing into FCPX and Premiere.
    I called Sony on Feb 13, 2015. I spoke with Doug (case no. 661972). I've been using my NX-3 for about 3 months. I'm still testing Sony NX-3. Looking for a way to transfer the video and audio without dropping audio frames. I didn't catch it at first, I mean it's only a few audio frames. It seems to happen with files over 12 minutes shooting. It seems that I can't upload the video/audio shot in my NX-3 to either my iMac (using FCPX nor Premiere) nor can I upload it to my PC (using Premiere) without 3 to 6 audio "frames" being dropped. When I spoke with Doug at Sony, a person I've actually spoke with in the past, he seemed frustrated. I was speaking with him as a professional and was attempting to find a solution, he was being protective and wanted to place blame at other companies. He stated that the camera played back the files correctly so it isn't a Sony problem. I explained that it is a problem for all of us if we choose Sony as our purchase. He told me "you should all buy Canons next time." That kind of through me. How do you speak to that. I explained that I am just looking for a solution and he told me to call the software and computer companies. Doesn't Sony realize that just because the camera works, that isn't the end of the road. You need to put the video into a devise to edit the video. I asked him what software would he recommend to a professional to use to edit footage taken by the Sony, he no reply. All I received from Doug was a really bad feeling about Sony. I've been a Sony "shooter" for over 34 years. I still can't believe the way I was treated. Not sure now what path I will take with this. But I surely need to tell everyone (all of my associates who have been asking me how I like my new camera) what response I received from Sony. Buy a Canon. By the way, I asked if Sony might have another camera of the same type that didn't drop audio. Doug didn't know. Really strange. Is Doug not happy with his prosition with Sony? 

    Auto Correct:
    As far as I'm aware this cannot be turned off. Someone may prove me wrong on this point
    CDDB Update:
    Again, as far as I'm aware this cannot be done. You could use WMP to update the files then import them into iTunes.
    Music Deletion:
    iTunes seems to only ask you if you want to delete a file if the file is located in its library folder. In the Preferences>Advanced>General section try changing your iTunes Music Folder to the folder where all your music is stored and it should ask you if you want to move files to the recycle bin when you delete them.
    Library Update:
    This is a feature I with iTunes would introduce. When you delete or move a file iTunes loses track of it. What it needs to be able to do is first check to see that all the existing files in the library are still there, and remove the ones that aren’t, then it needs to search for new tracks.
    It can search for new tracks but if you have renamed a file, then it will be in the library twice, one is the old file (which will no longer play because it doesn’t exist) and the other is the new file.
    The way I now avoid iTunes annoyances in relation to file names and folder organisation is I let iTunes sort it all out for me. Selecting "Keep iTunes Music folder organised" and "Copy files to iTunes folder when adding to library" will get iTunes to sort your music into Artist folders, then within the Artist folders are Albums, then within the album folders are the actual files, which are named Track Number Artist. For example Coldplay - Clocks will be named 05 Clocks.mp3.
    WARNING: Selecting "Keep iTunes Music folder organised" will copy all the music in your library to the iTunes Music folder. You must have enough Hard Disk space to do this.
    ...that wound up longer then I thought it would. Hope you can make sense of it all.
    Cheers,
    Ben

  • While trying to merge pdf files which are having the version 1.4 throws err

    As per my business need i need to merge some pdf files. Among those files some are having the version above 1.4. I am using the api "oracle.apps.xdo.jar ".
    While trying to merging the pdf files its throwing the exceeption like
    " oracle.apps.xdo.XDOException: oracle.apps.xdo.template.pdf.exception.FatalException: The template seems to be in either corrupted one or newer version than PDF1.4 ".
    If all of the files are having the below 1.4 version then working fine. But any one of the file have above 1.4 version then it is throwing the above error.
    Please can i have the solution for this problem.

    Thanks for the response.
    Sorry.there is no option to feed again into <1.4 version. cause those documents are already existed in database and i have to use the same documents to merge.
    So is there any alternate solution on the same .

  • HT201442 I am got error while trying to restore,, but i just only error file with 3194. I try many step by install lastest version and fix host file, but still fail. Anybody can give me any key point to solve this problem? Thank you

    I am got error while trying to restore,, but i just only error file with 3194. I try many step by install lastest version and fix host file, but still fail. Anybody can give me any key point to solve this problem? Thank you

    Error 3194:
    This device isn't eligible for the requested build
    It means that Apple has stopped signing the version of iOS that you have, try downloading the latest iOS version, then try Restore again.

  • My Macbook is running on OS 10.5.8. However, I forgot my admin password. I would like to find out if I can use OS 10.6 CD to reset the admin password while upgrading OS? Also, will all my files be still present after upgrade??

    My Macbook is running on OS 10.5.8. However, I forgot my admin password. I would like to find out if I can use OS 10.6 CD to reset the admin password while upgrading OS? Also, will all my files be still present after upgrade??

    1. Should be possible to do that; go to the Utilities menu and select 'reset password' before starting the installer. (while booted from the DVD of course)
    2. Standard installation of SL only replaces system components; applications, user data and preference settings should not be affected.
    3. But you do have a backup just in case, don't you?

  • Hi when i switch on the macc 41 files open at once can not open any files while this is happing can still use AI & PS and the internet any help thanks...

    Hi when i switch on the macc 41 files open at once can not open any files while this is happing can still use AI & PS and the internet any help thanks...

    Are you wanting to stop the 41 files from opening at once or is this intentional? At what point do they open when you power on the mac or when you boot Illustrator? What OS version are you using?
    If you can  answer the questions above can provide better advice, but you may be running into something similar:
    http://www.mactip.net/stop-lion-restoring-previous-files-apps/

Maybe you are looking for