File.renameTo() and locking

Hi,
I would like to rename file, but File.renameTo() will not work if the file will be locked by some other process. If other process has locked the file, I would like to wait for it to release the lock. So I have:
FileLock lock = new RandomAccessFile(file, "rw").getChannel().lock(0L, Long.MAX_VALUE, false);
file.renameTo(destFile);
lock.release();But this does not work, because file is locked and renameTo does not work (returns false).
What can I do to lock the file myself (wait for other locks to be released) and to rename it (rename does not work when file is locked).
Regards
Pawel Stawicki

hi, I don't thik you have to lock the file yourself while renaming it because that is (from my point of view) an opperating system's job to do it.
you could maybe make a
while(! file.renameTo()){
thread.sleep(1000);
to wait till its unlocked.
I'm not sure that helps but that's just an idea

Similar Messages

  • How do I select multiple files under "Get File Info"and lock or unlock all?

    How do I select multiple files under "Get File Info"and lock or unlock them all? It seems to do it automatically when I have 10 or more selected. But how do I lock or unlock 5 or 6 files in one swoop? Thanks

    Select the desired files then press OPTION and select Show Inspector from the Finder's File menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Time Machine backup file corrupted and locked

    This morning when I switch on my Mac there was a dialogue box telling me that my Time Machine backup file was corrupted and that Time Machine would have to create a new backup file.
    I am backing up my Macs to a disk connected to my Airport Extreme. It's been working for months without any problems. Other than this morning. Time Machine buddy had the following message:
    +Starting standard backup+
    +Attempting to mount network destination using URL: afp://[email protected]/MyBookHome+
    +Mounted network destination using URL: afp://[email protected]/MyBookHome+
    +QUICKCHECK ONLY; FILESYSTEM DIRTY+
    +Runtime corruption detected on /Volumes/MyBookHome/iMac27.sparsebundle (fsck_hfs -q termination status: 3)+
    +Attempting to mount network destination using URL: afp://[email protected]/MyBookHome+
    +Mounted network destination using URL: afp://[email protected]/MyBookHome+
    +Backup verification failed for image /Volumes/MyBookHome-2/iMac27.sparsebundle!+
    +Moved previous backup image to /Volumes/MyBookHome-2/iMac27_2010-11-01-032949.sparsebundle+
    +Recovery backup declined by user.+
    +Backup canceled.+
    +Ejected Time Machine network volume.+
    Has anybody seen something like this before?
    I now have a locked and renamed sparsebundle on my disk and backups are not working anymore.

    aschmid wrote:
    Yes you are right, I know it isn't supported - as so many other things but they work!
    This one is notorious for working for a while, then . . . not.
    In addition to the problems above I got a pop-up from Time Machine saying the backup file is broken and it needs to create a new one. I told it to go ahead and what happened is that it actually proceeded to DELETE the old backup file before creating a new one - there goes my several months of backup history!
    Yes, just as it says in the message. See #C13 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum).
    All I can say do now is connect my drive directly to my iMac and figure out a way how I can backup my other iMac and the MacBook I have. On the AE this just worked remotely.
    Yeah. Until it didn't.
    Really not much options here to backup a home with 3 Macs!?!
    Sure there is. Back the others up to the same drive, over your network, via sharing. See #22 in [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of this forum), for details and setup instructions.

  • WinXp SP3 (32bit OS) paging file peaks and locks up Captivate

    We recently installed Captivate 4 on one of Windows XP SP3 (32bit OS).  When the user is using text to voice tool, the pageing file started growing and it peaks at 1.85 GB and Captivate locks up.  The PC has 2 GB of Physical memory.  I had chaned the value of the paging file, but the issue still occurs.  Also I upgraded the phycial memory to 4GB and it did not help either.  So current work around is leave the performacne window open and watch out for paging file grwoth. Once the paging file reaches 1.5 GB, user closes out the application and that flushes out the paging file.  The size of the project is approximately 90 MB.
    Also we have installed the app on another machine and getting the same result.

    Please, I do not understand your last posting very well. Did the user create a project, based on a PPT (2003 or 2007)? And he added Question slides (branded CP) to the project? What do you mean by creating questions/answers from the PPT-slides?
    Lilybiri

  • File.renameTo method issue

    I have a Java program which processes upto 10000 text files a day. The average size of these files are 1KB to 2KB and the java program parses the contents of the text file, validates and loads them into a database table.
    The program outline is as follows
    File[] filesToProcess = sourceFolder.listFiles();
    int fileCount = filesToProcess.length;
    for (int i=0;i<fileCount;i++) {
    File currentFile = filesToProcess;
    MsgParser fileParser = new MsgParser(currentFile);
    if ( fileParser.isMessageValid()) {
    boolean uploadSuccess = fileParser.uploadToDB();
    if (uploadSuccess) {
    if (currentFile.renameTo(parseSuccessArchiveFile))
    logger.info("File successfully moved to archive folder);
    else
    logger.info("File cannot be moved to archive folder);
    } else {
    if (currentFile.renameTo(parseFailureArchiveFile)
    logger.info("Parser failed file moved to archive folder);
    else
    logger.info("Parser failed file cannot be moved to archive folder);
    The above program outline works well. However the renameTo method is not renaming the parsed files successfully on all occasions. There is no performance issue involved here as the files keep streaming in throughout the day and the program is able to handle the parsing of the file(s) in a fraction of second.
    The issue for me is that I keep picking the files to parse from the source folder at regular intervals ( after a full iteration of the files list, wait for 10 seconds before calling for a new set of files ) and cannot afford to have a failure in moving the file to the archive folder as otherwise, I end up parsing the same file multiple number of times, which I want to avoid.
    Can anyone shed some light on the behavior of File.renameTo and how to make it work successfully?
    Sundar

    I am making the code more readable for you all and corrected some typo errors...
    File[] filesToProcess = sourceFolder.listFiles();
    int fileCount = filesToProcess.length;
    for (int i=0;i<fileCount;i++) {
          File currentFile = filesToProcess;
          MsgParser fileParser = new MsgParser(currentFile);
          boolean uploadSuccess = false;
          if ( fileParser.isMessageValid())
               uploadSuccess = fileParser.uploadToDB();
          if (uploadSuccess) {
                if (currentFile.renameTo(parseSuccessArchiveFile))
                      logger.info("File successfully moved to archive folder);
                else
                      logger.info("File cannot be moved to archive folder);
          } else {
                if (currentFile.renameTo(parseFailureArchiveFile)
                      logger.info("Parser failed file moved to archive folder);
                else
                      logger.
                      info("Parser failed file cannot be moved to archive folder);
    }

  • Certifying and Locking file Invalidates Certification and Signatures in Acrobat 9.0.0

    I am running Adobe Acrobat Professional 9.0.0. After creating a PDF document from within Microsoft Word, and it opens in Adobe Acrobat Professional, I performed the following steps:
    Select Forms => Add or Edit Forms.
    Select the digital signature tool and create three forms.
    Select Close Form Editing.
    Right click the first form and select Certify with Visible Signature.
    Set Permitted Actions After Signing to Form Fill in and digital signatures.
    Select Sign.
    Save the document, replacing the original file.
    Click on the second field, to sign it, and select sign.
    Save the document, replacing the original file.
    Click on the third field, to sign it.
    Select Lock Document After Signing, and select sign.
    Save the document, replacing the original file.
    I then find that the certification and the first signature are invalid. Only the last field to be signed is valid. Why is the previous signature and certification invalid? This only appears to occur if I both certify and lock the document when signing the last field. If I view the document in Adobe Reader 9, the result is the same. However, if I view the document in Adobe Reader 8 the certification and all the signatures are valid, as expected.
    Any assistance much appreciated.
    Regards,
    David,
    Canberra, Australia.

    Thanks for the responses Geo & Atin,
    Geo,
    Maybe I'm misunderstanding what you're saying, but http://www.adobe.com/devnet/reader/articles/reader_compatibility/readercomp_digitalsignat ures.pdf seems to indicate otherwise. Specifically:
    "In Acrobat 9, when additional signatures are applied to a document, the earlier signatures continue to have the Valid status, subject to the certificate validation rules that have been part of Acrobat's signature processing for a number of releases.
    In Acrobat 8, all signature appearances except the last one would have changed their status to "Valid with subsequent changes" (green check with a yellow warning triangle) if their certificate was still valid."
    So I read this that in neither version should the signature be "invalidated" by simply applying another signature, but in version 8 it showed the triangle warning, and in version 9 nothing would change. Indeed nothing does change in version 9 and it works EXACTLY as described above providing I don't both certify AND lock the document. I still don't understand why just the extra locking step violates the "certificate validation rules".
    Atin,
    I carried out the steps that you described, and it works thank you. I notice that the lock option is not present when I sign the last field now, but presumably this is because by the time the last field in signed, with the settings you describe the document is effectively fully locked anyhow?
    Now my problem is, is there any way of setting up templates of the signature fields laid out in the correct position, with the settings that you describe that I can use repeatably on many documents? I wish to use this function to electronically sign technical drawings which are drawn in a CAD package using a template based title block with 'drawn by', 'checked' and 'approved' fields etc. Each drawing may also have many sheets, each with the same fields in the title block. My concern is that to manually place digital signature fields in these 3 spaces in every title block after creating the PDF's, and then apply the settings you describe before certifying (at 'drawn by') and distributing for sign off at 'checked' and 'approved' is going to be a very time consuming and inefficient process. Am I missing something?
    Regards & thanks again,
    David.

  • Layering and locking a h.264 movie on top of a flash file

    Let me start by apologizing. My Flash skills far outdo my
    DreamWeaver abilities, so I'm pretty new at the program.
    I have run into a problem that has forced me back to DW and
    that is for the video quality I need, I have to use Apple's H.264
    codec; however, I cannot embed this in Flash like the flv's that I
    was using. So my question is: Can I layer a .mov file on top of a
    Flash file in Dreamweaver and lock it's position so that they stay
    together? It seems that this is what Hollywood is doing with their
    movie trailers on their websites. I would really appreciate any
    feedback on this.

    The standard solution is to set wmode="transparent" and <param name="wmode" value="transparent" /> in your embed/object html, but that only helps to fix the problem in win/IE. The problem has been there on Adobe's own home page for years. If you're unlucky enough to use a Mac there's no effective solution for this problem.

  • Can´t empty my trashcan and my files are not locked

    Can´t empty my trashcan and my files are not locked?

    See the X-Labs troubleshooting FAQ for the Trash - http://www.thexlab.com/faqs/trash.html.
    You should find an answer therein.
    Good luck,
    Clinton

  • Java and XML :: Unlocking, editing and locking an XML file using JAVA

    I need to develop a form with Address field , When i enter address information and submit the form it needs to generate an
    XML file for furthur processing.
    Now my problem is :
    When i want to edit the address....after submitting the form by entering the address information, it should unlock
    the XML and edit the XML and then lock it.
    How can i achive programatically, unlocking an XML file, editing the file, and locking it?.
    Thanks,
    Maruthi.

    There's a FileLock class, you know, in the java.nio.channels package. However before you start using it you should read its API documentation carefully including statements like " Whether or not a lock actually prevents another program from accessing the content of the locked region is system-dependent and therefore unspecified".
    Personally I would say that if you need to synchronize access to this XML file, you should consider changing your design to use something that supports locking a bit better, like a database. Or by writing a server that encapsulates the XML file and accepts requests to read it and update it, serializing those requests appropriately.

  • JFileChooser and File.renameTo()

    Hi,
    Anyone experienced strange behaviour from the JFileChooser returned
    File Object. In my case it's an instance of:
    sun.awt.shell.Win32ShellFolder2
    Unfortunatly the File.renameTo(File file) method doesn't work
    properly with this File instance.
    Anyhelp is welcome / dzone

    overwrite the approveSelection() method of your JFileChooser. in there you can do your checks before executing super.approveSelection().
    tthomas

  • ITunes 6.0.3 destroyed my music files (mp3 and m4a).

    iTunes 6.0.1 has destroyed a significant amount of my 35,000 song library. Not just the library, but the SONG FILES. Take a look:
    http://riggswerks.com/itunes/diy_gaps.gif
    This is an mp3 file that has been opened in Peak. See all those gaps? They were added by iTunes.
    What happens is when a song that has been damaged like this goes to play, iTunes will only play it till its first gap (in the case of the screenshot song, about 2 seconds). Once it hits the gap, it moves on to the next song in the playlist. For some reason, iTunes is adding the gaps and duplicating small portions of the song in between the gaps, cutting off several seconds of the song ending, etc. So, it wouldn't be as simple as cutting out the gaps in a sound editing program, because song data has been added as well. The files are useless. I tried to upload one, but my ftp client wouldn't allow a file that severely damaged to be moved.
    Two questions:
    a) Is iTunes 6.0.1 safe to use? I'm scared to death that it will end up trashing more of my music, so I reverted to version 5, and locked my dedicated 250GB music hard drive. Anyone out there that can help explain what's going on would be tremendously helpful.
    and
    b) It seems that once there is a screwed up song in the iTunes library, it forces any overwritten file for the bad songs to adopt the gaps and characteristics of the previous version. For example, I reburned a couple of these bad songs from the original CD and selected for iTunes to replace the songs as they burned (after unlocking the hard drive)- when I went to play it, the new song- ripped straight from CD minutes before- had the same gapping problems. How can I reimport my good versions of these files if iTunes adopts the gaps and errors? I'm stuck.
    For further reference (others have had similar/same issues):
    http://discussions.apple.com/message.jspa?messageID=1308126#1308126
    http://discussions.apple.com/message.jspa?messageID=1308121#1308121
    http://discussions.apple.com/message.jspa?messageID=1308060#1308060
    http://discussions.apple.com/message.jspa?messageID=1307909#1307909
    For those who may know how to help- here's my set up:
    PowerMac G5 Quad running 10.4.3
    iTunes 6.0.1 (reverted back to iTunes 5 now)
    TIA. core4

    hiya!
    hmmm. okay, here's a user tip on moving your music files to a different drive. can you spot anything you might have missed on the first attempt?
    MacMuse: Move iTunes music/Library to new drive
    love, b

  • Please help! Major problems (performan​ce and lock-ups) with brand new W520 with Intel 520 SSD

    My company primarily uses HP machines but I've been a long time IBM (now Lenovo) fan so I recently had IT purchase me a new Lenovo W520 (product ID 42763LU).
    Once the machine arrived I had them do the following:
    Remove the 500GB HDD and replace it with an Intel 520 series 240GB SSD
    Remove the optical drive and install the 500GB hard drive that came with the machine in the optical bay (with the bay adapter of course)
    Format both drives and put a preconfigured windows 7 64-bit image on the SSD
    A general summary of the system is the following:
    Intel i7-2860QM CPU
    8GB RAM
    NVIDIA Quadro 1000M
    Intel 520 240GB SSD (primary HDD) [SSDSC2CW240A3]
    Hitachi 500GB HDD (optical bay) [HTS727550A9E365]
    Intel Advanced-N 6205 network adapter
    TouchChip Fingerprint Scanner
    The machine was a few days delayed getting to me due to "hard drive driver issues" (that's what I was told). When I received the machine I immediately noticed that it was much slower than I expected (I have a custom built i5 HTPC at home running windows 7 on a Crucial SATA III SSD that I was comparing it to) and I was experiencing frequent hangs (ranging from 30 seconds to multiple minutes), super long boot times, general “slowness” at times, and occasional lock-ups. Since our "baseline" laptop here at work is the "equivalent" HP workstation my IT guys have been less than helpful in helping me to solve this issue. Being reasonably computer savvy I decided to try to try to fix the issue myself. I performed the following “troubleshooting” steps:
    1. One of the first issues (errors) I noticed in the event viewer was errors related to the optical drive. Clearly the image they installed on the machine was not from a machine with the same hardware configuration. So, I decided to just wipe the machine and perform a fresh install of windows 7 from the disks (well, USB). After spending multiple days installing windows, performing updates, making sure all the drivers were current, and installing only the critical software I need, I was disappointed to realize that although I fixed the optical drive errors the machine was still slow, was hanging, and locking up regularly.
    2. Removed the cover on the machine and removed/reinstalled the drive to verify it was secure.Everything looked good.
    3. Verified the latest firmware is installed on all my Intel hardware. Everything seemed up to date.
    4. I performed a number of troubleshooting steps like booting the machine with/without the battery, with/without the HDD in the optical bay, installed/removed from the docking station, etc. and none of these things helped (also a note – occasionally when running on the battery I was hearing a strange “buzz” or “static” sound coming from the area around the SSD).
    5. Next I did some internet research and learned quite a few things. First, it sounds like others have had similar problems with this machine and/or SSD combo and there were quite a few options suggested to “fix” these issues. The general consensus for troubleshooting steps were:
    5.1. Download and install the latest Intel chipset drivers and AHCI controller drivers (overwriting whatever windows installs during updates).This didn’t fix anything.
    5.2. Turn off PCI express link state power management in the power manager. This didn’t fix anything.
    5.3. Disable superfetch, prefetch, indexing, defragmentation, page file, system restore, and hibernate. A few of these were already disabled by windows so in those cases I just verified they were disabled in the services and application editor. These things may have slightly increased performance but did not fix the major hang/lockup issues I was having.
    5.4. I followed online steps to edit the registry to disable the PCI link power management by adding ports, adding the required variables, and setting them all to 0. This did seem to have fixed the hangs and/or lock-ups but the machine is still much slower than I would expect (boot times are still pretty slow and it does “stutter” when I’m doing more than one thing at a time. Also a note here – I have the Intel SSD toolbox installed and I noticed that it was giving me a warning for DIPM not being optimized. I made the mistake of clicking “Tune!” and then started having the hang/lock-up issues again. I went back into the registry and sure enough the PCI link power management variables for ports 0 and 1 were set back to 1. I set them back to 0 and the hangs have gone away. I will not be “tuning” the DIPM through the Intel SSD toolbox again…
    6. I also fixed a couple of other minor errors I was seeing in the event viewer by disabling benign services and/or making slight timeout modifications (I researched each issue on the internet to verify they were benign before I implemented any changes). These fixes didn't seem to do anything other than make some of the errors/warnings go away. So, the list of errors/warnings has become much smaller but I’m still getting the following (maybe an issue, maybe not?):
    Event ID 37 for every processor saying that they are in a reduced performance state for xx seconds since the last report
    Event ID 10002 - WLAN Extensibility Module has stopped
    Event ID 4001 - WLAN AutoConfig service has successfully stopped
    Event ID 27 – Intel® 82579LM Gigabit Network Connection link is disconnected
    I suspect the WLAN errors have something to do with windows fighting with the Lenovo access connection tools?
    7. Since the machine still seemed slow I downloaded the program AS SSD and checked the performance of the SSD. When I compared my performance numbers to the benchmark numbers I found onlineI was very surprised to discover that I’m getting about 50% of the performance that I should (values below are read/write).
    Seq: 262.11 / 188.32 (s/b 504.58 / 298.28) [MB/s]
    4K: 15.83 / 44.92 (s/b 21.70 / 62.60) [MB/s]
    4K-64Thrd: 165.23 / 154.46 (s/b 241.38 / 234.08) [MB/s]
    Acc.time: 0.218 / 0.294 (s/b .0186 / 0.208) [ms]
    Score: 207 / 208 (s/b 314 / 327)
    Overall Score: 533 (s/b 797)
    One more note - it seems like my cooling fan is running at a high speed almost all of the time. This is probably one of my power settings (I think I have it set for max performance) but it's even doing this when there is no load (i.e. I'm using IE and just vieweing webpages - like right now).
    So, I apologize for such a long post but I’ve spent countless hours researching and troubleshooting this problem and haven’t been able to figure out what the heck is wrong here. Am I missing something simple or do you guys think I have a SSD and/or problem with the machine itself? To say that any and all help would be greatly appreciated would be a massive understatement – I’m on the verge of pulling my hair out and I really need this machine working as quickly as possible!
    Please let me know if you have any suggestions and/or need additional information. Thanks in advance for your help!
    -Erik

    Lol gotcha about the drive as an option. I didn't go SSD with mine. Do you have the latest firmware on your drive? It is supposed to be v1.97. Just checking (ah and I see item 3 so guess so). Do you have the SSD drive toolbox software installed?
    http://downloadcenter.intel.com/SearchResult.aspx?​lang=eng&ProductFamily=Solid+State+Drives+and+Cach​...)
    Seems some useful tools are in there. I can't say much beyond that with the drive. Oh. Why does your fan always run at high speed? Can you describe that?  I mean, are we troubleshooting the right kind of issue? Is there anything else going on with your system? I saw about the reduced core speeds message. what are your system loads like? Anything causing high cpu utilization? Could be something other than the drive causing your low numbers and lockups.

  • A File Reference and its evolving life!

    Hi all,
    I've noticed something that came as a little bit of a surprise to me, but I think I have the explanation, at a hand-wavy higher level anyway.  What I have not established is if this is a 'bug' or a 'feature', and if there are any ways the following issue can be avoided at the NI function/api layer.
    Consider the file open and file close function.  You open a file, you use the reference to the file to write/read data, then at some point you close the reference and the close function spits out the file-path.  Here are a couple of tid-bits you may not be aware of (that are easy to test):
    Q1) After your application opens/creates a file and starts using the file-reference to make file writes, if an external source changes the file-name of that file... guess what will happen on your next write function call?
    A1::  The write successfully updates the newly re-named file with your new data without producing an error or a warning.  (At least this is the case if your program is running on a vxWorks cRIO target and the file-name is changed directly on the cRIO via an FTP browser.)  
    Did this surprise you? It did surprise me!  -My handwavy explanation is that the file-pointer is perhaps managed/maintained by the OS, so when the OS tells the file-system to rename that file, the pointer that LabVIEW holds remains valid and the contents of the memory at the pointer location was updated by the OS.
    Q2) Continuing from the situation setup in Q1, after writing several new chunks of data to a file now currently named something completely different than when the file reference was originally created, you use the close function to close the file-reference.  What do you expect on the file-path output from the close function??  What do you actually get??
    A2::  The close function will 'happily' return the ORIGINAL file-name, not the actual file-name it has been successfully writing to(!).   This has some potentially significant ramifications on how/what you can use that output for.  At this point there is a ton of room for pontifications and more or less 'crazy' schemes for what one could do, but I argue that the bottom line is that your application has at that point completely lost the ability to accurately and securely track your file(s).  Yes, you could list a folder and try and 'figure out' if your file-name was re-named during writing and you can in various ways make more or less good 'guesses' on which file you in reality just had open, but you can never really know for sure.
    So, what do you guys think?? Is the behavior of returning the (incorrect) original file-path when you close the handle a BUG or a FEATURE??  Would it not be possible for LabVIEW to read back the data contained in the (OS?) pointer location and as needed update the file out path data when it closes a reference?  Should we not EXPECT that this would be the behavior?
    Q3)  Again, continuning from the above situation, lets assume we are back at the state in Q1, writing data to a (re)named file.  What happens if the file is deleted by an external process? What happens to the file reference? File function calls using the reference?
    A3::  This one is less surprising.  The file reference remains 'valid' (because it is a valid reference), but depending on the file function you are calling, you will get error such as error 6 (binary write reports this), or error 4 (a TDMS write will report this error), etc.  So as long as you don't rely on file ref-num tests to establish if you are good to go with a file-write or file-action, you should be safe to recover in an appropriate way.. Just don't forget to close the file-reference, even if the file is 'gone', the reference will still remain in memory until you 'close' it (with an error)(?I might be wrong about this last part?)
    I am not sure if the above is possible on e.g. Windows, Windows would probably prevent you from re-naming a file that has an open file-handle to it, but this is definitley observable on at least vxWorks cRIO targets.  (I don't have PharLap ETS or RTLinux devices so I can't test on those targets.. if you want to test its pretty straigth forward to make a simple test app for it.)
    [begin rant-mode related to why I found this out and why this behavior BITES]
    There are situations where the above situation could cause some rather annoying issues that, for somewhat contrived reasons related to cRIO file API performance, CPU and memory resource management, are non-trivial to work around.  for example, using the NI "list folder" to listing folders take a very hefty chunk of time at 100% cpu that you cannot break up, so polling/listing folders after every file update (or even on a less regular interval) is a big challenge, and if you are really unlucky (or didn't know any better) and gave the list command in a folder with 1000's of files (as opposed to less than about 100 files), the list will lock your CPU at 100% for 10's of seconds...  Therefore, you might be tempted to maintain your own look-up table of files so that your application can upload/push/transfer and/or delete files as dictated by your application specific conditions... except that only works until some prankster or well-intention person remotes in and starts changing file-names, because then your carefully maintained list of file-names/paths' suddenly fall appart.
    [\end rant]
    QFang
    CLD LabVIEW 7.1 to 2013

    Hey guys, thanks for turning out your comments on this thread!
    -Deny Access : still able to re-name (and delete) the file via FTP browser (didn't test other file avenues).  I think this is for the same reason that NI vxWorks targets (such as cRIO-9014) do not support the concept of different users with different rights, as such, everyone have access rights to everything at the OS level.  Another issue for me would be that "Deny Access" does not work on TDMS file references, so even if it worked, it would not help me.
    --> I strongly suspect that these things are non-issues or issues that can be properly managed, on the new NI LinuxRT targets since (the ftp is disabled by default) it supports user accounts and user restrictions on files/folders.  The controller could simply create the files in a tree where 'nobody else' has write access.
    Obviously nobody should mess around with files on a (running) cRIO, but customers don't always do what they are supposed to do.   
    As far as the 'resources' or overhead to update the file-refnum with the new information, this would not be needed to be done in a polling fashion, simply, when the file-close function is called, as part of that call it updates its internal register from the pointer data, so this should be a low overhead operation I would think?  If that is a true concern, a boolean input defaulting to not updating or a separate 'advanced close' could be created?
    I've included a zip with the LV2013 project and test VI's (one for tdms one for binary) that I've used. nothing fancy, but in the interest of full disclosure.  The snippet is the 'binary file' test vi, in case you just want a quick peak:
    Steve Bird's findings of (yet) another behavior on Pharlap systems is also very interesting, I think!!
    [EDIT]  JUST TO CLARIFY, on vxWorks, the re-named file keeps being successfully written to, unlike the PharLaps' empty file that Steve Bird found.
    QFang
    CLD LabVIEW 7.1 to 2013
    Attachments:
    cRIO Tests.7z ‏30 KB

  • InDesign file saving and exporting S-L-O-W.

    I am a designer using the InDesign/InCopy layout workflow. After my last post things were working pretty good for awhile. But now it is taking more than an hour to save over the network. I tried putting everything in the same folder on the network (links and all) and it still took me more than an hour just to relink a placed InCopy story. I am going mad. A week overdue for my first draft and I can't do anything. So today I decided to just  use the package workflow to speed things up. However it still takes as long to create assignments even after I have saved the InDesign file and links to my desktop.
    Is there any possibility this is caused by using the last document and saving as new name? Even if I have unlinked all assignments and stories first?
    I've tried saving as an inx file but I lock up.
    Thanks for your help in advance,
    Holly

    It turns out that is the issue. AnneMarie, were you able to find the other thread? I thought my problem was solved by deleting the random 40,000+ lines of garbage using a text edit program. But the random lines are re-generated each time I save the file in indesign. My IT Manager thinks it has to do with the InCopy plugin. In analyzing the 'garbage lines', here is what we do know. Each time a body of text is saved using the InCopy plugin, it is generating 62 unique id's of random URLs, and multiplies those id's 657 times...thus creating 40,000+ lines of garbage that bogs down the file. The urls are not used anywhere in my Indesign file, so we can't figure how the plugin is gaining access to the URLs to generate them.
    We tested it on a brand new block of text in the file that had never been exported as an Incopy file (working off the desktop the whole time) - and the resulting .icml file still had similar URLs generated (all 40,000+). The plugin version is 6.0.0.352. Indesign Application version is CS4 6.0.4.578. Here is one URL pulled from the file: <HyperlinkURLDestination Self="u54e9" Name="URL 275" DestinationURL="http://www.evanta.com/details_popup.php?cmd=speaker&id=6963" Hidden="false" DestinationUniqueKey="694"/>
    Any ideas on how to stop the URLs from generating each time I have to save the file?
    Pelagia

  • Printing FILE NAME and DATE PRINTED?

    when i was on a mac i used to be able to have a default in the printer dialog so that every page printed showed the file name and the data printed. i would like to do this in the mac but i am guessing that this has to be done in either the specialized software dialog box or perhaps in a mac dialog box?
    in any event, can anyone help me figure out where i might find a place to do this? i haveadobe acrobat but i wold also like to do it in something like Preview as well.
    TIA

    hotwheels 22 wrote:
    if i have documents coming that i print for a project and these are quite naturally coming from different software it i have no way now of being able to FIND this file in my computer when i am looking at it.
    Consider using Find from the File menu or Spotlight to search for the document. In one of your previous posts, you stated that you name documents with a date and name. Then perhaps search for the name. Also, with your method of naming documents, if the document is a letter, wouldn't the date on the letter and the person to whom the letter is addressed to give clues to the filename and thus finding it on your computer?
    this is a major organizational issue over here and customizing a template for all my various software should be unnecessary IMHO.
    I do not know how many documents you deal with but I do know that there a many organizations that deal with billions of documents. In addition, if you share documents with others or others with you, there is not a filenaming method that works for everyone. People adapt to each other. A date in a filename could have several forms such as month-date-year or year-month-date, two digits or four digits for year and so on and so forth.
    Are you saying it IS necessary to have this dual file type that has a Pages document which then prints a PDF?
    No. Please re-read  what I wrote and the Pages Help Center articles.
    also, is there in fact a way to save a PDF back out as a Pages document?
    Yes, re-read what I wrote (that which you quoted).
    "Acrobat has the capability to save a PDF in other formats such as Microsoft Word, which can be opened in Pages. That said IMO, a separate Pages document for each "custom" letter/report would not be necessary."
    alternatively i guess i could create a Pages TEMPLATE - that has a DATE in the header that automatically updates .../but/ i am realizing that this has the unfortunate consequence of having the DATE updated if i open the Pages document again
    But that is what you stated you wanted because
    ...and try to remember to SAVE AS this document with another name with the original FILE NAME but a NEW DATE. this does not always work and sometimes i write over the original accidentally.
    anyway, maybe the answer here is to create a Template for any new document type and simply use this template any time i need to create a PDF and then not save or delete the original Pages document but this seems a bit hairy and dangerous in terms of possibly losing a file if i forget to print to PDF or something.
    You have redundant backups, yes?
    It seems that your understanding of a template is different from what it actually is, its purpose and its use. If you have not already done so, try using one of the included Pages templates to create a document that you would reuse to get a better understanding of how it works and to help determine your workflow. What you wrote in the last post seems to be a lot of what ifs but not hands on experience with the software itself. My response was based on my experience of using many types of software and in particular to your questions, Pages and Acrobat. Perhaps you will find better responses in the Pages forum and for Acrobat there is a forum at the Adobe web site.
    is there a lock file functionality in Pages in Mountain Lion or was this in Lion?!
    Perhaps reviewing the tutorials for Pages or searching with Google would  help answer many of your questions.

Maybe you are looking for

  • Premiere CC - Graphical Glitches after using Plural Eyes - Please advise!

    Just ran a bunch of clips through Plural Eyes and Now I have this extremely annoying graphical error where it creates red lines over the clips and the white bars (sometimes are black). None of this will go away and I'm not sure what's going on at all

  • JDeveloper and Serena Dimensions

    I have just upgraded to JDeveloper 10.1.3.2.0 with Serena Dimensions extension 10.1.3.40.66. We use Serena Dimensions 9.1. I can connect with the Dimensions server with no problem and can set the workset version but can never get the check in/check a

  • Installing SBO on DB2

    Hi SAP GURUs, I am trying to install SBO on IBM DB2 V8.2 (Express Edition). While installing SAP SBO I am getting following error message. <b><i>1). [IBM][CLI Driver][DB2/NT] SQL0444N Routine "*eldValue" (specific Name "SQL05032014132500) is implemen

  • How to join three symbols as shown here in wwi using its features

    hello I want to connect three symbols in this position using wwi techniques but was not able to do rotation and use text box to join these object . any help

  • Mp3 playback in QT

    I have an avi that used mp3 to encode the audio. The movie does not have any audio when i play it. I've done some research and it seems that QT does not support mp3. Is this right?? Is there any work around for this? Maybe a dummy codec or something?