File path of open data storage

Hello all!
Now I'm using the blocks of open data storage, write data and close data storage for storing and extracting result data. For the file path issue, before I
set the data path by double clicking the "open data storage" block and inserting the file location in the indicated place, and that worked!
Now since I made a stand alone application of this program and shall use it in other computers, the file location I inserted in open data storage block isn't
valid any more in other PCs. So I modified my source code by connecting a "current vi path" to the open data storage block's file path node instead of
inserting it inside the block, and this doesn't work! During running there shows an error in the write data block saying that the storage refnum isn't valid!
I'm wondering why I couldn't specify the file path like this. Any way to allow me to specify the file path as the current vi path?
Thanks!
Chao
Solved!
Go to Solution.

You need to account for the path changes when built in to an application, have a look at this example.
https://decibel.ni.com/content/docs/DOC-4212
Beginner? Try LabVIEW Basics
Sharing bits of code? Try Snippets or LAVA Code Capture Tool
Have you tried Quick Drop?, Visit QD Community.

Similar Messages

  • Getting File Path to Open

    Is there a way to copy a full file path from a cell in Microsoft Excel to the clipboard and have Finder open it using another program?
    the Microsoft Excel cell looks like this...
    Primary Hard Drive:Microstock 2.0:Automation Processes:Automating Folder System:Bright:Bright Series Choices Circles.jpg
    the script I have looks like this but won't work...
    tell application "Microsoft Excel" to copy range (cell "B1" of worksheet "Keywording 2.0" of workbook "Metadata")
    set thefile to (the clipboard)
    tell application "Finder" to open thefile using "Primary Hard Drive:Applications:Adobe Bridge CS4:Adobe Bridge CS4"
    tell application "Adobe Bridge CS4" to activate
    I get an error "Can't make "Description" into type item.

    There are several flaws with your script, which are compounding your problem.
    First off, you're using copy range within Excel, which isn't what you want - that's intended to copy a range of cells within a worksheet to another worksheet.
    Secondly, even if that did work, you really don't want to use the clipboard for this. There's no need, for a start, and it disrupts whatever else the user may have had on the clipboard. Just think of AppleScript variables as being an infinite number of named clipboards and you can see that you could easily use an AppleScript variable to pass the data between Excel and the Finder.
    So, first off, getting the data out of Excel, you want to get the value of the cell and put it in an AppleScript variable:
    tell application "Microsoft Excel" to set myFilePath to value of (cell "B1" of worksheet "Keywording 2.0" of workbook "Metadata")
    Now myFilePath has the path data, which you can pass to the Finder:
    tell application "Finder" to open file myFilePath
    (although there may be no need to use the Finder at all for this - you can open the file directly, or tell Adobe Bridge to open the file, but the point of using AppleScript variables still stands)

  • Listing File, path, sizes and dates

    Hi all
    Case: I have 6 machines on one network (some with 2 drives), another on another network (connected by vpn) and 3 external drives.
    These all have accumulated stuff, some repeated as I've upgraded and re-purposed machines but left directories behind as a safeguard.
    I need to rationalise the space and develop a more systematic approach to backup and archiving.
    My first step is do an inventory of what's where and my natural approach is work with a data base of file name, path, size, created date and last modified to allow me to do some maths on archiving to dvd.
    Using find as follows
    find [Start Somewhere Directory] -print > [workspace path]/TestOutput.txt
    gives me a nice list of file name I can parse out in a database
    But I don't get size and dates.
    Adding -ls produces that info but creates header lines for parent directories and adds permissions, node and other info I don't need.
    I got to here
    find [Start Somewhere Directory] -type df -exec ls -lshk {} \; -print > [workspace path]/TestOutput.txt
    but still has the hierarchical output rather than flat paths.
    Am I doing this all the hard way ? Is there a tool that returns just what I'm looking for ?
    Or what command will allow me to take just the relevant columns form ls to the print parameter ?
    Or can I extend find to add the size and date info to the output ?
    Kind Regards
    Eric

    Eric
    I just so happened to have done something similar before!
    It relies on mdls so isn't exactly speedy, but produces a full path, size, modification date, modification time, creation date and creation time as a comma separated list. mdls is not exactly predictable as to which order you get its output, so basically you have to try first without any editing.
    Anyway, here it is:
    sudo find ~/testfolder -type f \! -name ".*" -exec echo 'mdls -name kMDItemFSSize -name kMDItemFSCreationDate -name kMDItemFSContentChangeDate "{}" | tr "\n" "," | sed "s%^\(/.*\) .*ChangeDate = \(....-..-..\) \(.*\) .CreationDate.= \(....-..-..\) \(.*\) ...00,.FSSize.= \(.*\),$%\"\1\",\6,\2,\3,\4,\5%"' \; | shI'm sure it could be improved!
    You could also do it with AppleScript, since that can access the creation date easily.

  • Problem with the log file path on the Data Logging Control Veristand

    Hello everyone,
    My problem is that I use a computer as a gateway on the network. It is connected to PXI in Real Time. I have another computer connected to the gateway to read the given PXI. I am unable to record on my local hard drive using the Data Logging Control VeriStand on the second computer. However, it can save me on the hard disk on the network. Moreover, I have no problem to record if the computer is a gateway.
    Regards,
    Kamal Bouamran

    For simplicity, let's call the computer running Veristand Computer A and the gateway computer Computer B.
    So, just to clarify, you're running the Veristand workspace on Computer A, which is connected to your network and the RT PXI (on which the system definition file is deployed) through a gateway, Computer B. With this setup, you can't use a data logging control to save a file to Computer A's hard drive. However, you are (from the workspace running on Computer A) able to save a file to Computer B's disk or to another drive elsewhere on your network. Is that all correct?
    What happens when you try to configure the control to log to computer A's disk? Do you get an error (and if so, what error)? Does the file path default to a different location?
    Also, what version of Veristand are you using? What version of Windows are you PCs running?
    Regards,

  • See file path when opening a file is CS

    I have wondered this for some time. When I open/place a file into CS, it will by default open to the most recent files and folders accessed. Sometimes I have more than one folder by the same name (one on server, one on my desktop for example). I often would like to double check the path where these files are located. But the path does not show up when opening a file from the application. Show path bar is only visible when you access the files straight from the finder. Is there any way to see the path from "open or place"? I often have to re-establish the path to ensure I have the right one.

    Update your video card driver from the GPU maker's website.

  • Not able to open data file in a rule file

    Hi,
    We have a rule file which has 140 columns. We are trying to add two new columns at the end (i.e. 141 & 142). We have added those columns in input text file and opened that text file in rule file. So automatically two columns are added at the end of rule file. Mapping is done properly. After that we saved that rule file.
    But next time when we opened that rule file and clicked "Open data file" option nothing is happening. We are not able to open data file in that rule file. But that rule file is working fine when we are running it.
    Can you please give any hint why it is not working?
    Thanks.

    Just a thought about your data file -- maybe 142 columns is too much? Yes, I know, if this is loading to a BSO database, and the columns represent a dense dimension, you are super duper efficient, but is the game worth the candle?
    What happens if you drop one of the members? Mark the column as Ignore During Data Load? Several columns? And then you need to add in new ones? KABOOM!
    FWIW, to keep the process as flexible and maintenance free as possible, I make every record one data value if I have any say in the matter. Yes, it is not efficient. But at least I don't get calls at o-dark-thirty telling me my process blew up and I need to fix it right away.
    NB -- I suppose these are two extremes and the right answer is somewhere in middle, but I will note that you likely won't have issues with reading and writing a data load rule with my approach.
    Regards,
    Cameron Lackpour

  • Data storage and read

    Hello all,
    I got a problem in data storage and read. I used the combination of "Open data storage", "Write data" and "Close data storage" to store some data as an array as shown below.
    And used the inverted combination to read data as shown below:
    As shown the data file is in tdm form. This works fine in my computer, both the VI and the stand alone application. However when I run the stand alone application in a target pc, the storage file can't be generated!
    I don't know if it's the problem of my code or the problem of the target pc, since the target pc has tiny memory card with few drivers installed. I'm wondering if anybody could help me fix this problem. If there's other way I can store and read the file? or if I can make the target pc generate the tdm file.
    Thanks!
    Chao
    Solved!
    Go to Solution.

    What error is being presented when the file isn't being generated?  Is it an error with permissions?  Or an error with a folder not existing?  Can you manually make a file in the location where you expect the file to be generated?
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Application server file path vaidation

    I have written the code for application server file path validation.
      DATA : l_fname TYPE filename-fileintern." type c.
      DATA : l_filpath TYPE filename-fileintern,
             l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
    l_fname = p_sucfil.
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      CLIENT                        = SY-MANDT
        logical_filename              = l_fname
       OPERATING_SYSTEM              = SY-OPSYS
      PARAMETER_1                   = ' '
      PARAMETER_2                   = ' '
      PARAMETER_3                   = ' '
      USE_PRESENTATION_SERVER       = ' '
       WITH_FILE_EXTENSION           = 'X'
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
    IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
       FILE_NAME                     = l_filpath
    EXCEPTIONS
       FILE_NOT_FOUND                = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
      message 'Invalid file name' type 'E'.
    ENDIF.
    But always i will get Invalid file name.
    Y is it so.
    pls help me.

    Praveen,
    I have checked ur code and I found that if i give a logical file name from
    tran. FILE under folder 'Logical file name definition, cross client' then ur code works. Pl. check.
    Regards,
    Joy.
    DATA : l_fname TYPE filename-fileintern." type c.
    DATA : l_filpath TYPE filename-fileintern,
    l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
      l_fname = p_sucfil.
      CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      logical_filename = l_fname
    operating_system = sy-opsys
      with_file_extension = 'X'
      IMPORTING
      file_name = l_filpath
      EXCEPTIONS
      file_not_found = 1
      OTHERS = 2
      IF sy-subrc <> 0.
        MESSAGE 'Invalid file name' TYPE 'E'.
      ENDIF.

  • Logical file path problem in lsmw

    Hi folks,
    I created logical file  path in FILE tcode. its created and assigned physical file path to logical file path.
    then i am assigning that logical file path into lsmw step (specify file step).
    under specify file i am assigning into import data and convert data.
    once read data step completed read data must be save under this physical file but data is not saving under this path.
    can any one help me out this..
    1.can any one help how to create physical file in file tcode
    2.how to assigne that physical file to lsmw step specify file

    Hi Srikanth,
    There is no need to create the logical file path using the FILE transaction.
    Under Specify file step, you need to give your local file path in LEGACY DATA Section.
    Please check the below link in using the LSMW step by step.
    http://wiki.sdn.sap.com/wiki/display/ABAP/LSMWStepsin+Detail
    Hope this helps.
    Regards,
    Satish Kanteti

  • Lsmw converted file path

    hi all,
    i am loading sales order using lsmw direct input, and find a question. is it a must to specify a logical path and file name for the converted data at step specify file? at first, i didn't specify it and at the last step, i choose the flat file at my desktop in "File on presentation server with a physical file name", not the upper one "File on application server with a logical file name". and the result is "Table name not allowed". does that mean i have to use the logical one? any input will be appreciated.

    Hello Daniel Zhou,
    It is must to specify the file path in the step "Specify file", here you mentioned your flat file name in "Legacy data - On the PC (frontend)" based on that the system will create logical file path for converted data.
    Hope this helps.
    Regards,
    Arif Mansuri
    Reward if answer is helpful.

  • FLEX debugger not hitting breakpoints, because Flash sometimes embeds source file paths with wrong letter case?

    I was trying to figure out why breakpoints were working fine for source files in some locations but not others.  FlashDevelop's debugger (which I believe is actually the FLEXSDK debugger) was successfully connecting, tracing output, and hitting breakpoints in SOME files, but not others.
    I downloaded SWFInvestigator from Adobe Labs and checked the embedded debug paths for various source files to see what was going on.
    I discovered that files in which no breakpoints could be hit had their paths embedded in all lowercase (e.g. "c:\users\username\desktop\source\myproject" instead of "C:\Users\username\Desktop\source\MyProject").
    So I have two questions:
    First, is this a Flex debugger issue, or a FlashDevelop plugin issue? Letter case shouldn't matter or interfere with matching file paths in Windows.
    Second, what could possibly influence the letter case of embedded paths in a SWF output by Flash Professional (CS6), such that they are sometimes all lowercase and other times maintain the same case from the file system?  And why would that affect a debuggers ability to hit breakpoints in Windows 7?  I am compiling in multiple ways. Sometimes clicking Publish within Flash. Sometimes the file being published is not even open in Flash, and my JSFL script file is passed to Flash.exe containing embedded file paths to open the document. Usually, everything seems to work fine, no matter where I publish from, regardless of whether the FLA file is open or not. I'm honestly starting to believe that it depends on how the FLA was last opened in Flash Professional, as though it saves some sort of last access path internally and uses that to embed debug information.

    I don't think it's the source path in my case, because it's simply the dot ".", although I did check that because it would most likely influence the embedded paths.
    In the library path, I use relative paths exclusively, since all my individual project folders exist in the same "source" folder.
    Here's how I arrived at the conclusion that something more complex or "stateful" must be occuring:
    I publish my files with a one-click application, which does the following
    updates version timestamps (static constants) in specific files via regex match
    fills in a JSFL template with the FLA filename and writes the JSFL file to disk, then passes the JSFL file path to flash.exe for publication
    the JSFL then runs a command, which signals the main application via cross-process communication that the script has finished publishing
    That all makes it easy for me to update and publish multiple projects and deploy them, with a single click.  Here is the JSFL template I created, which has been drastically simplified since the days where it used to search to see if the file was open in Flash, select the document, and call publish.  Now it just uses the publishDocument method to silently publish files without opening them.
    var filepath = "FLAFILEPATH"; //template parameter: the URI (beginning with "file:///") of the FLA file to publish
    fl.publishDocument( filepath, "PUBLISHPROFILENAME" );
    FLfile.runCommandLine("COMPLETECOMMAND");
    The C# app replaces the strings in all caps with the actual values.  The COMPLETECOMMAND is actually populated with the application's own executable path, along with a "complete" switch, which lauches a 2nd instance, which handles the complete switch by broadcasting a signal over an interprocess channel and then terminates.  The main instance captures the signal, triggers a wait handle, and continues with publishing the next file.  Here is the core code for it:
    private string fillTemplate( string fla_directory, string fla_filename, string publish_profile_name )
        string fileuri = "file:///" + Path.Combine( fla_directory, fla_filename ).Replace( '\\','/' );
        return EmbeddedResources.OpenAndPublish //JSFL template file embedded as string resource
            .Replace( "FLAFILEPATH", HttpUtility.JavaScriptStringEncode( fileuri ) )
            .Replace("COMPLETECOMMAND", HttpUtility.JavaScriptStringEncode( "\"" + Application.ExecutablePath + "\"" + " -publishcomplete" )) //call self with -publishcomplete switch to signal main instance's publishCompleteSignal
            .Replace("PUBLISHPROFILENAME", HttpUtility.JavaScriptStringEncode( publish_profile_name ) );
    private static readonly string FLASH_PATH = @"C:\Program Files (x86)\Adobe\Adobe Flash CS6\Flash.exe";
    public void publish( string fla_directory, string fla_filename, string publish_profile_name )
        Program.publishCompleteSignal.Reset();
        string template = fillTemplate( fla_directory, fla_filename, publish_profile_name );
        string curdir = Environment.CurrentDirectory;
        string tempJSFLfilepath = Path.Combine( curdir, "temp_script.jsfl" );
        File.WriteAllText( tempJSFLfilepath, template );
        Process p = Process.Start( FLASH_PATH, tempJSFLfilepath );
        Program.publishCompleteSignal.WaitOne( 30000 ); //timeout after 30 seconds
    Here's where it gets interesting.  The FLAFILEPATH has ALWAYS been passed in as all lower case, yet this publication method has worked 99% of the time for hundreds of publish operations every day.  This applies to both the publication of the first SWC, which is referenced by the second published SWF (both were being published with lowercase paths), yet the paths for the main SWF were remaining in lowercase, while those in the referenced SWC were maintaining the correct case from the file system.
    So there may be any number of things going on here.  SWCs may be published differently than SWFs, such that SWCs always have the correct letter case for debug source files, regardless of how the source FLA project was opened.  Ensuring the path passed to publishDocument uses the right case definitely fixes the problem, but it doesn't explain why it usually worked, despite having always been passing a lowercase string.  The only variable I can think of in all of this is Windows itself or Flash, such as whether the document was open in Flash at the time the silent JSLF publishDocument command ran, and how that FLA was last opened (via shortcut, via "recent documents" in Flash, via recent documents in Windows.  It has to be something, even if it's something as obscure as how the folder path was last accessed in windows, although I strongly suspect it's just how (in terms of path case) the FLA was last opened in Flash.
    In any case, I'm happy that passing the right case to JSLF's publishDocument command fixes the problem, so I'm not going to spend any more time trying to figure out how opening the FLA in various ways could affect the embedded debug paths.  The only thing that should be done is to address how paths with the wrong case are handled when they do get embedded that way for whatever reason.  Perhaps the flex debugger should be updated to use case-insensitive matches in case-insensitive file systems, unless, perhaps, this is a FlashDevelop debugger issue after all.

  • How to diable file path prompt?

    Everytime I hit the run button the file path prompt opens up, how can I disable it? I want to manual click the folder icon to open up browse window. Here is my code.
    Attachments:
    path.jpg ‏15 KB

    panoramarts wrote:
    Is there a way to leave it empty and not have the dialog box open?
    What would be the point to run the VI if there is no file to open???
    You could use a loop and an event structure and place the file operations inside an event case that is triggered by a value change of the path control.
    LabVIEW Champion . Do more with less code and in less time .

  • Cannot open file /data_work/shuttle/ab.dat . Please check its path and per

    Hi Experts,
          We are extracting data from R3 and we have an  problem with this error message
    Cannot open file </data_work/shuttle/ab.dat>. Please check its path and permissions.This problem occurs everyday but with different jobs. One day the job runs fine and sometimes fails with this message. All permissions to the file are fine its so intermittent with these jobs that we unable to source the problem. Also after the problem occurs when you re run the job it runs fine.
    Its also hard to re create the issue. BUt happens pretty much  every day during our production schedule
    Does the job server fails to read it??
    We are using DS 12.2.0.
    Hopefully I've explained it properly
    Appreciate your thoughts on this

    How are you tranfering the file? Shared directory? What about trying with the FTP server method?
    (You need an FTP server on your SAP machine.., IIS for Windows, ftpd for Unix)
    This way the FTP protocol would take care of the transport to your DS machine.
    An advantage is that with the FTP method you can put retries into the DSConfig.txt file.
    1571986 - Error: Data Services FTP transfer for ABAP integration is giving error "Data flow <data flow name> FTP could not transfer file" while running an ABAP - Data Services
    Section: Key:
    AL_Engine FTPNumberOfRetry
    AL_Engine FTPRetryInterval
    Norbert

  • "File file path:to:file is already open" how do i close it?

    I am trying to write a script that pops up a dialog box, asks for text and saves this to a .csv and a .txt This is so i can quickly record what i am doing and the times i am doing it, makes quick notes and various things like that. However it is failing with the message "File file path:to:file is already open" so how do i close the file or get around this. Cheers
    Script Below
    tell me to activate
    display dialog "Enter the log message:" default answer "" buttons {"Cancel", "Ok"} default button "Ok"
    copy the result as list to {the log_message, the button_pressed}
    if the button_pressed is not "Cancel" then
    set curTime to (do shell script "date \"+%H:%M:%S\"")
    set curDate to (do shell script "date \"+%Y%m%d\"")
    set new_foldername to curDate
    set this_folder to (path to current user folder) as text
    set fPath2 to this_folder & "Documents:Logs:Date:" as alias
    --set this_folder to "Macintosh HD:Users:username:" as alias
    tell application "Finder"
    if not (exists folder new_foldername of fPath2) then
    make new folder at fPath2 with properties {name:new_foldername}
    end if
    end tell
    set fPath to (path to current user folder as Unicode text) & "Documents:Logs:Date:" & curDate & ":"
    set fName to curDate & ".csv"
    set myFile to open for access file ((fPath as string) & fName) with write permission
    write curTime & "," & log_message & return to myFile starting at eof
    close access myFile
    set fName2 to curDate & ".txt"
    set myFile to open for access file ((fPath as string) & fName2) with write permission
    write curTime & " " & log_message & return to myFile starting at eof
    close access myFile
    end if

    Hi Richard,
    Run this in the script editor:
    set f to choose file
    close access f
    Navigate to the file you left open. Probably there was an error and the file was left open because it never reached the 'close access' command.
    gl,

  • Pg Number, File path and date automatically printed?

    Is there a way to automatically print the page number, complete file path and date at bottom of each  page (set to landscape)?
    Thanks!

    Thanks Carlos,
    It looks like the work72a would work if we were using macs, but we're not...
    And there is NO WAY my boss will pay $999 for the other one, even if it did work.
    So, now I'm open to other suggestions. We have hundreds of clients that we do work for, and our jobs are organized in folders for each client. A lot of clients with the same name but different locations (ie., Fox Meadow OH, Fox Meadow TX), and each has a different folder. The files are named by dept and year (ie., 2012 Glass, 2012 Art). We often access old files (which, there are thousands of, because they have been organized this way for years.) We need to have the client folder on the page along with the file name (hence the file path).
    The script that Carlos created is great, but there are too many steps. Open the script, change location and select info to be displayed (3 steps), close script. There are days we access 50 jobs and the script just added 5 plus steps to each job.
    Is there a way to use a hot key run a script that will place the info when and where we need it and auto close the script? Or is there a way to display the full path (in the Illustrator tab?) where we can see which folder the file is in and we will manually type the folder? Or does anyone have another suggestion?

Maybe you are looking for

  • SAP Solution Manager Certification

    Hi there! I would like to give Certification exam in SAP Solution Manager 4.0. Pertaining to this could anybody share the related PDF Files. Regards, Suresh

  • "On My Mac" Folders Problem - Mails Disappearing

    I can not see emails in my "On My Mac" mail folders! They still exist, I can find them using the search function on the desktop, but they don't exist in the email application. I am a new mac user, just took it out of the box yesterday. I'm having a p

  • Mobile device javascript callback

    I want to make a mobile device application which it loads an html website. The best method i found till now to achieve that it is by using the StageWebView() class. With this i have a very good interaction but my problem is the follwing: I want to ta

  • Disabling Share Pane in Reader X

    Hi, just moved this thread to where it should be... I'm trying to configure options for a firm wide install of Reader X. I'm wanting to disable the "use share pane when sending email attachment" option via the registry (this'll be done via scriptlogi

  • WAImportExport Blob Storage Azure Virtual Machine

    Hi Guys I am looking to use the WAImport service to import 500GB of data to Blob Storage via my local DataCenter. Once uploaded to the container, how would I get this data to a file system in one of my Azure Server 2012 R2 VMs? An ideal solution woul