delete the file or ignore if it is already open

I have a piece of code that dates back to the time of LabVIEW 7.1 who should write an ascii text file to a server once every 30 minutes.  Each half hour file is the previously published, to which is added another 30 minutes of data and 4 contains more data than does three 30 minutes so I iterate through a file number, 2, 3, 4, etc. and so on...  I write each new file I attempt to remove his predesessor such that in an ideal case there is only a single file sitting there at all times...  However, I want people to be able to open files on this server remotely any time they want to... In LabVIEW 7.1, if I tried to delete a file that was already open, it did NOT generate a stop error show but just went...  I could manually later then go start the file here or there that someone would open during the attempt to delete was made...

But now I'm running in LabVIEW 2011 there is no the same luxury...  If I try to delete a file that is already open, the code generates an error and wait...  It is bad because nobody is there to answer...  I read another post on the search to see if the temporary files exist, but I don't know exactly what to look for so that people can use one of a slew of programs, reading from Excel to Matlab to WordPad to open these ascii text files...  Surely, there must be an attribute of a file that I can watch that will tell me it is currently open and if so, I can just ignore this deletion and move...

Bottom line, it is how can I tell that a file on a server is opened by an unknown application on some Office far away?

Thanks bob...

Most likely, you are running in wiich auto error handling is enabled by default in new versions of LabVIEW (it did not exist in older versions). Whenever a function returns an error, but the error is not wired, it will appear an error message.

Make sure that you manage the error in not leaving the error disconnected. (for example just Ingore by wiring up to a limit of structure) so it appears an automatic error dialog box.

Tags: NI Software

Similar Questions

  • What happens if I delete the files in the Temp folder in Windows 7?

    What is happening in the windows--> Temp folder in windows 7, and if I delete the files there, that will be a problem?  I want to free up the disk space of 1.8 G, but can't find any info anywhere of the consequences of deleting these files, what they are for, or how they got there.  Thank you!

    In general, it is safe to delete anything in the Temp folder.  Sometimes, you can get a "Cannot be deleted because the file is in use" message, but you can just ignore these files.

    For safety, do your Temp directory deletion right after you restart the computer.  Sometimes a program installer will put something in the Temp directory it needs to complete the installation after a reboot.  If you restart and wait a bit so that they were, whatever left in the Temp folder should be OK to delete it.

    If you want to be conservative, use the built-in Disk Cleanup tool (type of cleaning disc in the search box).  If you select "Temporary files" as one of the elements to clean (deleted), by default, that Disk Cleanup removes only the files that have not changed in 7 days.

  • "Backup canceled because all the files were ignored"

    Hello

    I'm performing backup of database by using the following command:

    Run {}
    allocate channel c1 device type disk;
    database backup incremental level 0 more entered archivelog delete;
    output channel c1;
    Validate restore them database;
    }

    While they inspected the RMAN newspapers, it ends, and I can say that it is a good backup. I can also list the components of backup that has been backed up. After this step, I want the flash_recovery_area on a backup tape, I used this command:

    Run {}
    allocate channel t1 device type sbt;
    BACKUP RECOVERY AREA;
    REMOVE the TYPE of DEVICE OBSOLETE sbt;
    output channel t1;
    }

    When I do that, I get this message from the newspapers, and I see not all tape backup:

    -NEWSPAPERS-
    allocated channel: t1
    channel t1: SID = 503 device type = SBT
    channel t1: Oracle Secure Backup

    From 23 July 11 backup
    Specification does not match any newspaper archived in the recovery catalog
    Specification does not match any data file copy in the repository
    Specification does not match any backupset in the repository
    backup cancelled because all the files were ignored
    Backup finished July 23, 11

    RMAN retention policy apply to the order
    RMAN retention policy is set to 7 days recovery window
    not found obsolete backups

    output channel: t1

    RMAN >

    I don't understand why I get this message when in fact, I archivelog and datafile backupset saved in my FRA. Any ideas?

    Thank you!

    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK to 'C:\oracle\flash_recovery_area\PROD\AUTOBACKUP\%d-%F ';
    CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G FORMAT 'C:\oracle\flash_recovery_area\PROD\BACKUPSET\%d-%T-%U ';

    When you specify a FORMAT, Oracle takes this format as the backup location. It may happen to be physically identical to your FRA, but it is not logically the same as your FRA.
    A BACKUP RECOVERY AREA is not 'find' these backups because they are not logically in the FRA.

    You will also find that Oracle automatic management of the FRA (where it automatically removes OBSOLETE etc backups) will not work against these backuppieces - once again, because they are "not in the FRA.

    A good backup RMAN that goes to the FRA relies on 'db_recovery_file_dest' (and "db_recovery_file_dest_size"). This is set up, a simple "BACKUP DATABASE" (or "BACKUP AS COMPRESS BACKUPSET DATABASE") will create BackupSets in the FRA. It will automatically create the appropriate folder structure (each day is a new folder). Controlfile AutoBackups, too, should use the FRA.

    See the Oracle support Article: 'configuration correctly the box Flash recovery to allow the release of recoverable space [ID 316074.1] ".

    Hemant K Collette

  • Cannot delete the file on my Mac

    I feel so frustrated at the moment. It's my computer and my files and sometimes it says I don't have permission to delete or it is used when it is not because it is the first time I have connected the player via an ethernet cable.

    I don't know if he connection via ethernet cable makes a difference. I searched the net and cannot see messages about how to empty the things you cannot delete from the trash. Any help would be appreciated. Thank you

    Sorry, I'll try and be a little more specific. The I'm trying to delete files are video files and projects related to the soft of Adobe. When I try to delete the file, it indicates a specific folder with videos is in service. I did not open this file or folder for more than a year.

  • 42 error code when you try to delete the file

    PDF file which can be opened and read.  However, when you try to delete the file, error file not found 42 made its appearance.  MacBook Pro computer

    Please relaunch the Finder , and then try again. If there is no change, restart the computer.

  • If I delete the files in iCloud will be they deleted from my computer as well?

    "I get the message" your iCloud-storage space is almost full.

    I can delete some folders from iCloud, but removing in iCloud will also remove the original from my computer?

    Thank you

    If you have the Apple menu > System Preferences > iCloud > iCloud drive in market, any file you save in iCloud drive automatically saves a local copy on your record player iCloud on your Mac, and it synchronizes to iCloud by car to https://www.icloud.com/

    If you delete the file or the other place that will not delete automatically from both locations.

  • What is the file deleted the files in the main folder, and can / should I remove it?

    What is the file deleted the files in the main folder, and can / should I remove it? Is it too much room, I could use?

    This file stores a list of files from previous version of Firefox that are no longer needed or supported in the current version of Firefox. This file is only a few KB and it is best not to delete files in the Firefox program folder to avoid update problems. If the required files are missing or modified with a update Firefox will download the full version (approximately 10 MB) instead of a small incremental update which is usually only a few hundred KB.

  • Add, change and delete the file "iTunes" on a NAS

    I have just said "Apple Support Community" by Apple Support.

    The title probably sums up what I'm trying to do. I'm looking for a way to add, change, and delete files on a NAS.

    Hardware: MacBook Pro 15, 1 TB of storage, 16 GB memory, OSX El Capitan.

    NAS: Qnap TS - 453 has: storage nominally 16 TB, up to about 5 TB.  4 WD 4TB disks in a RAID 5 configuration.

    a Vaio WIN10 as well as a smaller MacBook (my wife)

    The purpose of the NAS is to provide a backup system for computers and act a server "iTunes."

    I acquired the NAS after the death of my WD MyBook live in December 2015 after five years of reading backup and "iTunes" to my computer and the Sonos system.

    After two months of 'getting to know you' with the NAS, I finally managed to configure the server "iTunes" and Mirabile Indo-European it works!  I'm just doing the SIN to a back-up for computers.

    Now for the question: I am looking for an app (for lack of a better term) that will allow me to add and remove files to and from the NAS "iTunes" folder

    My search for a solution so far has indicated that:

    (1) NAS' iTunes folder is not really true Apple iTunes and

    (2) I need something that is DAAP (Digital Audio Access Protocol) friendly, that would allow me to add, change and delete the files.that would allow me to add, edit and delete files.

    I'm not looking for something that would synchronize the files iTunes NAS to one of my computers, I am all prepared to do myself if necessary.

    If I can't find an application so I use the app 'Brute Force' change my Mac iTunes required records and download again to my NAS.

    Why do you need an app to put the files in a folder on the NAS Server?  Make them just above in the Finder.  Maybe I'm missing just your problematic here.  Do you mean add your PEMA files to iTunes? I've never used this file format, but kind of, I would be very surprised if iTunes supported it.

    the NAS iTunes folder is not really true Apple iTunes

    I don't understand what you're trying to say here.  "Apple iTunes" is an application. Yes, a folder is not an application.

    Be warned, we see not few messages from people that use iTunes with a NAS. Often the problems cannot be explained. sometimes just iTunes and NAS disagree togther.

  • Pop-up window automatically downloaded a file to my laptop. I deleted the file in my downloads, but how can I be sure I have removed completely?

    Pop-up window automatically downloaded a file to my laptop. I deleted the file in my downloads, but how can I be sure I have removed completely?

    If you know what has been downloaded, I would use EasyFind:

    https://iTunes.Apple.com/us/app/easyfind/id411673888?MT=12

    In addition, I would like to launch Malwarebytes Anti-Malware for Mac:

    https://www.Malwarebytes.org/Mac-download/

    These steps will not guarantee that all items have been reomoved.  This is possible only by backing up your data, erase the HARD drive and then reinstalling the OSX and your data.

    Ciao.

  • Delete the file

    Hi all

    In my vi I used write on the worksheet and read from spreadsheet to create a file or modify the file. Now I want to add a longer IE delete a file.

    Requirement: should I have a combo box, where the list of files, everything I have is listed on. I will keep a button named delete. When I press the button Delete, the file selected in the drop-down list box should be removed.

    How can I do? any idea?

    Attached something to help you get started. If you have any questions or concerns, feel free to ask in this example is simply listed content of a file and stored paths and file names in a key-value pair (by group) and add an option to drop-down list box. When "delete" button, the event fires and deletes the selected file.

  • Can not build an installer, because it seems to have deleted the files required

    LabVIEW does not locate the Installer source of a component necessary to build this installer. LabVIEW finally found the missing element in the following distribution:

    The distribution name: NOR-DAQmx 8.6, disc 1
    Last known installation path: C:\National Instruments Downloads\NI-DAQmx\8.6\NIDAQ860-1

    Search source for NOR-DAQmx 8.6, disc 1 Setup and build your installer again.

    Visit ni.com/ask support request page to learn more about the resolution of this problem. Use the following as a reference:

    CDK_Build_Invoke.VI.ProxyCaller > CDK_Build_Invoke.vi > CDK_Engine_Main.vi > CDK_Engine_Build.vi > CDK_Engine_PromptForMissingDist.vi

    Loading information of product deployment
    Loading information of product deployment
    Adding files to install
    Makes adding files
    Preparing to build the deployment
    Copy of the products of distributions
    Copy distribution "OR-DAQmx 8.6, disc 2" of: C:\National Instruments Downloads\NI-DAQmx\8.6\NIDAQ860-2\ to: C:\LabVIEW\DAQ\Pentium4_Loggers\builds\Installers\Data worm 23a\ P4 Logger ".
    Deployment of the completed building

    I think I must have deleted the files required from my C drive.

    (Updated)

    This is now fixed.

    I managed to resolve this, by a combination of download OR-DAQmx 8.6.1 from the Web site of NOR and NOR-DAQmx 8.8 disc installation.

  • How to delete the files from my HP ePrint app after download / print?

    Can someone tell me how to delete the files from my HP ePrint app after that I downloaded and printed. Thank you

    jmsandkds,

    I apologize for the confusion. Options you speak of "photos, web and file" are located on the phone somewhere, lets say you click files. When you click on files, it will search the phone for available files that are able to print the ePrint app. To the extent where they are on the phone, you will need to search for them via the search screen, connection to the computer, or some files are program specific and only available in this program to be read, edited, or deleted.

    I hope this helps.

  • The user may not delete the file from the folder on the server but can rename file

    Hi all

    Please suggest how to give permission to some folder so that the user may not delete all the files in the folder but can create, update, or RENAME the folder.
    I gave permission where user is not able to delete the file, but the user is also able to rename the file or folder in this specific folder.

    Thanks in advance.

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    http://social.technet.Microsoft.com/forums/en-us/winserverfiles/threads

  • How can I delete the file on my hard drive RT after getting the file to the PC host using FTP Get file vi?

    I want to get a file on my hard drive of the cRIO to my host PC. I did it by using the FTP Get file vi. After you save this file in my host PC, I want to delete the file on the cRIO. Is there a direct way to transfer the file to the host PC cRIO or do I have to manually delete the file.

    Concerning

    Dude

    Hello

    You must manually delete the file.

    Concerning

    Visuman

  • Delete the files in the C:\i386\svcpack directory

    I need to free up space on my C: partition, this directory looks like as if it had a good number of files that can offer valuable space, I need

    Hi Yoda-R6,

    Deleting files from the i386 is not recommended, unless you have a genuine Windows XP installation CD. Sometimes the files in c:\i386 (or C:\Windows\ServicePackFile\i386) are needed to replace a damaged operating system file.  It doesn't happen very often, but if this happens to you and you have deleted the files, then you may need to use the Windows XP installation CD to replace the files.

Maybe you are looking for