Advanced File Functions

Hello all,
I have a subVI that deletes 5 files which should always be present on my desktop due to a run before.  However, I have to put in a fail-safe that skips the delete process if the files are for some reason missing.
Attached is the simple file path constant and Delete file directory process that I currently use.
Is there any way I can utilize any of the other Advanced File Functions with a Case Structure and other Boolean Functions that can detect whether or not the files are there and then delete them if they are, or just skip the delete process if the files are not there.
Thanks
Attachments:
Delete Files.vi ‏16 KB

The Delete VI will skip the process on its own. The simplest thing to do is to call it and ignore the error (for example by using the Clear Errors VI). Just make sure not to wire an error into it if you do this, because you will then clear that error.
As for some other tips regarding this VIs -
Using constant paths is often a bad thing, especially if your are going to build the code into an executable and\or move it to another computer. Getting the path to the desktop is done in Windows through a special function which you can call by using the Call Library Function node, or you can hold the base path in a global.
I suggest that unless absolutely necessary, you should not save your files to the desktop, but to another folder.
You should create error in and out terminals, so that you can control when the VI runs.
Giving it a less generic name is also a good idea, because LV can not hold 2 VIs with the same name in memory.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
Try to take over the world!

Similar Messages

  • File upload from form using cf8 file functions within cfscript?

    essentially, i'm wondering if anyone can give me an example
    of a way to replicate cffile upload using cf8's native file
    manipulation functions within a cfscript tag?
    more specifically, i am wondering if anyone had any code
    examples for uploading a file specified by a user on an html form
    using cf8's file functions (fileOpen, fileCopy, fileDelete,
    fileMove, fileClose, etc....) within a cfscript tag. i've done this
    a number of times in the past using upload through cffile, but i'd
    like to take advantage of cf8's new native file functions and be
    able to deploy the code within a cfscript block.
    i've found some simple examples of the file functions within
    the docs and online, but nothing showing me how to take a file from
    an html form and upload it where i want it, as cffile will do.
    thanks in advance for any help.

    those cf8 file functions are for manipulating files on the
    server.
    you still need to upload the file in one way or another.
    as for replicating cffile action=upload in cfscript: just
    write a
    function that uses cffile tag to upload a file, and call that
    function
    from your cfscript!
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • TDMS Low level file functions and Saving Front Panel image

    Am using TDMS low level file functions to save while also plotting data in my data acquisition programme.  However, I also want to programmatically be saving the front panel image on every run of my data acquisition.  I have coded all other aspects, except the behavior of functionality of saving the front panel image on every successive runs of the application.  Unfortunately, I just have no idea on how to code this aspect on LabVIEW, and all effort to search for example codes on so far have not been successful.
    I would appreciate any useful hints or steps from anyone for me to follow, in order to accomplish this behavior, and that is being able to programmatically save my front panel images while using TDMS low level file functions in my File IO system of my application.
    Thanks in advance.

    Tebefia wrote:
    Am using TDMS low level file functions to save while also plotting data in my data acquisition programme.  However, I also want to programmatically be saving the front panel image on every run of my data acquisition.  I have coded all other aspects, except the behavior of functionality of saving the front panel image on every successive runs of the application.  Unfortunately, I just have no idea on how to code this aspect on LabVIEW, and all effort to search for example codes on so far have not been successful.
    I would appreciate any useful hints or steps from anyone for me to follow, in order to accomplish this behavior, and that is being able to programmatically save my front panel images while using TDMS low level file functions in my File IO system of my application.
    Thanks in advance.
    Did you see this link?
    CLA, LabVIEW Versions 2010-2013

  • Configuration "use next available filename" in "write measurement file" function

    My project recording signal and saving using "Write to Measurement File" function. I want to perform record multiple segments signals should have configured option "use next available filename". For example, if the original file is data.tdms then it will save the file into: data_1.tdms, data_2.tdms, data_3.tdms, ...
    To do that I use a button control enable and disable write functionality.
    In the past I have done normally. Now, I can not make it anymore, now every write new data were add into one file created without the next new file as desired, it has almost become a option "Append to file".
    I use LabVIEW 2013
    Solved!
    Go to Solution.
    Attachments:
    write measurement file.vi ‏54 KB

    Hello ducta9,
    It looks like you currently have the Write to Measurement File Express VI configured to "save to one file" - this means that all data from a given session will be saved to the same file.  The file number will only be incremented once the application is restarted or the Reset Boolean input is set to True.  If you want to save to a series of files, select the "save to a series of files" option and configure the Express VI as needed to generate new files at intervals. 
    If you want to write variable-size chunks of data to a new file every time the user clicks the Enable button, you might be able to get away with just wiring a True constant to the Reset.  I would still recommend taking a look at the options available in the save to a series of files settings.
    Best Regards,
    Tom L.

  • How to use  Advance java function in graphical mapping in XI 2.0?

    Hi,
    currently I am using a simple java function to make an RFC call to R3 system.
    I want to avoid making connection for each lookup. Instead I want to make a single connection for whole message queue and get the corresponding values in some array or container object.
    please suggest a solution.
    I think this is possible using Advance java function, but I am not able to find any example on using Advance java function at help.sap.com.
    thaks in advance.

    Hi!!!
    I'm not sure if I understood you well.
    Do you want to preload some data into your structures in the memory and keep them there so you don't need to make a new connection during processing the whole message or every message?
    In my opinion you can cache some data during processing a message, but it's impossible to cache some data between processing messages.
    If you write your java mapping or you use graphical mapping (even with user-defined function), then you have a java class. The problem is that XI 2.0 reloads this class during processing every message, so even if you load some data from your data source into your structures in the memory, this data will be lost after reloading your mapping class.
    Regards,
    Andrzej Filusz

  • App.opendoc does not display security warning window like e.g. "open a file" function?

    When I link from one PDF to the other via "open a file" function (both PDFs are located in %userprofile%/mydocuments directory), Reader X and XI open a security warning box. If I agree to open the target file, this specific file always opens without displaying the warning again.
    When I link to the same file via app.opendoc, the security warning box does not open. So I do not get a chance to add the target file to the list of trusted files.
    Is there any way to motivate app.opendoc to display security warning boxes due to the new sandboxing technology in Reader >= X? So that I get a chance to add the target PDF to the trusted PDFs?

    Is there any chance that the application is being run from Developer Suite? In other words, is Developer Suite installed on the client machine and hosting the app?
    Regardless, although anything is possible, I have never heard of what you are describing. In all cases, the dialog box should be the java dialog which is a grayish/purple color. The exact color will vary depending on the JRE version you are using.
    If my first point is not the case, I would recommend that you consider using WebUtil 10.1.2.2 and also patch the AS environment to the same version. To get WebUtil to 10.1.2.2, you will need to patch a Developer Suite home and copy frmwebutil.jar to the AS home. After patching, I believe you will also find an updated webutil.pll in the DevSuite \forms directory which will also need to be copied then compiled on the deployment server.
    Also, ensure that you are using Jinitiator 1.3.1.26 or newer. If you are using the Sun JRE, be sure you are using a certified/supported version. For example, you can use the latest 1.5.x Sun JRE with Forms 10.1.2.2, which is 1.5.0_15

  • How can i do the upload file function using tomcat library??

    how can i do the upload file function using tomcat library??

    Did you read the document for the library?
    If you can't figure it out, why don't you ask the people who provide the library?
    This has nothing to do with JavaMail.

  • How to use trigger file functionality in File Adapters - Match file names

    Hi,
    I am using trigger file functionality in File adapters to pick up data files as:-
    <property name="TriggerFilePhysicalDirectory" value="/pub/Dev/eastern/brs/"/>
    <property name="TriggerFile" value="*.trg"/>
    Here any file with .trg extension is taken as a trigger file and File adapter randomly picks up one of the data files.
    My requirement is that the trigger file will be of the same name as that of the data file like:- <data_file>.data <data_file>.trg
    How to implement this feature using trigger file functionality of File adapters??

    The trigger file is any file that indicates(triggers) that the actual data file has been put in ftp location, i.e- determines the state when data file should be read.
    This helps usually when a large data file is being transferred and at that incomplete state the FTP adapter tries to read it(which is not desirable)
    It is configured when you create the ftp adapter service in your process(in wizard) or u can manually configure that in the JCA file for the FTP Adapter service as below:-
    <?xml version="1.0" encoding="UTF-8"?>
    <adapter-config name="FlatStructureIn" adapter="File Adapter" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/FileAdapter" UIincludeWildcard="*.txt" adapterRef=""/>
    <endpoint-activation operation="Read">
    <activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
    <property.../>
    <property name="*TriggerFilePhysicalDirectory*" value="/tmp/flat/ArchiveDir"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    Reference: http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10231/adptr_file.htm#CIAJCBGI

  • HR Renewal: Client infotype with upload/download file functionality

    Hi Gurus,
    I am writing to you today cuz a client of mine asked me to adapt one of their client-specific infotype for HR Renewal. Now the old-legacy infotype was developed by someone else so I am just to adapt the functionality for decoupled infotype framework and front-end.
    The infotype has no subtype and record from 01.01.1800 to 31.12.9999 with a table-control listing all the pdf (or other format) file for a particular employee (such has income tax statement; SEPA bank account sheet; ID card etc... any kind of personal document relevant to employees). (that data is listed from a client Z table when opening the infotype; e.g. there is not sub-strucutrue in the pnnnn to  represent that information).
    upload, download and open file functionality is done via the infotype old-framework screen 2000 by some custom code merely replicated what is available by cl_gui_services.
    File are stored directly on the SAP system not using the GOS option;
    back-end stuff is more or less done and working at least I can do pretty much what I want in puit_ui tcode; read;modify... off course no file upload there
    front-end is another story; I have managed the FPM views for the infotype (dataset; biz card, etc) and also I have managed to list the existing file in the ATS list.
    However What I need still to do is to be able to upload from NWBC files to the back end system; and also download or open them. this seems to be a little harder than expected.
    I am now doubting if I should rather do a P&F FPM form based or if I can achieve what it is suppose to do? or maybe I should go back to the client and talk him through changing that infotype architecture? using subtype instead of a connection to a Z table and GOS services to store employee files seems way easier for me; but still I am facing the upload/download functional which I dont really no how to wrap around the FPM either it is ATS or GL2. I have checked indian-specific infotype 3743 has this uploading functionality (GOS) but no corresponding FPM I could inspire myself on!
    Also, not sure if I am missing something but when I try to change the value of one the field on the infotype pnnnn structure (that infty actually has one checkbox field) and save I end up with a dump because to BOL model does not find my entity (lo_entity). it s not the first infotype I am enabling for HR Renewal and I never had this error before.. I wonder what I am missing....
    Would you gurus oriente me a lil on how I should best proceed? should I rather use P&F? Your help and advise would greatly be appreciated!
    Thanks.

    Hello:
    So after some thinking through:
    - upload and download are handler by the FPM ATS feeder (client copy with enhanced options into to manage event method).
    - lo_entity without pointer causing dump occurred because I had inconsistently used the set automatic tag option into the FPM configuration floorplan editor.
    - PAOC_ASR_PERSONAL_FILE would be my recommendation but client want to follow on its own mini-dev for personal file hosting.
    Thank you gurus!

  • Using advanced statistical functions in BO or creating your own ones

    Hello,
    Can someone tell me if it is possible to use more advanced statistical functions in BO (webi or deski f.i.) like the possibility to extrapolate figures. I only see a limited functions in Webi (mean, intrapolate, percentiles, ...).
    If not is it then possible to add own functions in the available functions?
    many regards

    I believe there are more possibilities in WEbi 4.O

  • Re:Which port does the copy file function use?

    Hi ,
    How does the Copy File Function work?
    Which port is used?
    My problem is … When user copies the large request output file, the network is slow. So I want to manage bandwidth such as using Qos .
    Regards .

    Hi hussein ,
    Please find the details
    1)Please post the details of the application release, database version and OS .
    App Release: 11.5.10.2
    DB Version: 10.2.0.4
    IBM AIX on POWER Systems (32-bit)
    2)How does the Copy File Function work?
    What copy file function you are referring to? Please post the navigation path.
    1. Submit Request
    2. View Output File
    3. Tools --> Copy File
    3)Which port is used?
    My problem is … When user copies the large request output file, the network is slow. So I want to manage bandwidth such as using Qos .
    How are you planning to manage the bandwidth of specific port?
    If I know which port is used, I can manage it (give it to low priority)
    Regards .

  • How to make "open file" function

    Is there a method that you can call that can prompt the user to open a file? Here is what I have:
    var file:FileReference = new FileReference;
    var newFile:BitmapData = new BitmapData (600,290,false);
    newFile.draw(file.upload(file.browse()));
    var s:Shape = new Shape();
    s.graphics.beginBitmapFill(newFile);
    s.graphics.drawRect(0, 0, board.width, board.height);
    s.graphics.endFill();
    board.addChild(s);
    What would I put in the line in bold to achieve this?

    How do I convert the File Reference to the bitmap data or a shape? This is what I have right now:
    var file:FileReference = new FileReference();
    var newFile:BitmapData = new BitmapData(600,290,false);
    file.browse();
    var selectedFile:FileReference;
    file.addEventListener(Event.SELECT, file);
    function f(e:Event)
    var selectedFile = FileReference(e.target);
    newFile.draw(e.target);
    var s:Shape = new Shape();
    s.graphics.beginBitmapFill(newFile);
    s.graphics.drawRect(0, 0, board.width, board.height);
    s.graphics.endFill();
    board.addChild(s);

  • Adobe Advanced Search Function not woking

    The Advanced Search Function has stopped working. I use mac os x 10.6.8. I deleted and reinstalled adobe reader 10.1.2 and still the same problem: nothing appears when I click on the Advanced Search function. I'd welcome suggestions on how to fix this. Thank you.

    Did you try the shortcut for Advanced search - option + shift +F. Do you not get the search window even then ?

  • Advanced math functions/libraries

    Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.

    Kramis wrote:
    Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.Not in the standard classes.
    You could look at the Apache Math library:
    [http://commons.apache.org/math/]
    perhaps it has some number theory methods.
    Or you could look into a Java bridge/interface between existing computer algebra systems (CAS) like Maple, Mathcad (both commercial) or the excellent opensource alternative: Octave. All these CAS have a bridge/interface to Java.

  • Error with "Open/Create/Replace File" function with cancel button

    I've attached a very simple VI that embodies what I want to do with my Open File function. I simply want to stop the rest of my program (theoretically encased in the Case Structure) from running if the user deigns not to specify a file location.
    However, if the Cancel button is clicked an error is produced before the rest of the program runs. If you ignore the error and continue, the "cancelled' variable is appropriately made true and the Case Structure runs properly. I simply want to remove the error message LabView gives me.
    Any ideas on why or how?
    Solved!
    Go to Solution.
    Attachments:
    Open file test.vi ‏34 KB

    The cancel button gives you error code 43 (if I remember correctly). After your file vi's, use the general error handler (GEH) to clear this error (and no other errors). Use
    [exception action]=Cancle Error on Match
    [exception code]=43
    type of dialog=no dialog
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

Maybe you are looking for

  • APEX is not working after upgrade from 2.3 to 4.2 in Ubuntu

    Hi all, i updated my running apex which i had installed with the 10gXE Version on ubuntu (9.04) and which was running fine I need this maschine for trainings and it was requested to update it. So i load the apex4.02 and installed like described als m

  • Time Machine Backing Up to Macintosh HD

    The other day, I was trying to back up my MacBook Pro. My time machine had been working well for two months, but when my Mac had been backing up for an unusually long time, I checked and I saw that the back up size kept increasing until I decided to

  • Forum (+ features?) for TextEdit?

    Howdy all - a) I'm looking for the appropriate forum for asking questions about TextEdit. I used the community serach box for identifying the appropriate community, but it gave no results in response to "TextEdit" or "Text Edit". b) Is it possible to

  • Can be accessed otherwise than by IomegaEZ browser to disk

    can be accessed otherwise than by IomegaEZ browser to disk? hello I need to access the drive from another more direct tool, NOT if it supports SSH and that port, but I try to log in from another form that is NOT for web to the configuration of the di

  • Facetime and iMessage doesn't  work after I upgrade to iOS5.0

    The Facetime was working well with iOS 4.3.5  but after I upgrade to iOS 5, the Facetime can't work  on my ipodtouch 4G  It always failed Does anyone have this issue too?