How to load files up one step from local working directory

Good afternoon,
I have a project assigned to me that has some Ni TestStand code written to read files from a fixed directory and I would like to change this directory to be the directory where the TestStand seqeunce file is located.
Furthermore, I would like to be able to step back one directories and forward into a different directory. Is this possible? I know in linux his is done with ..\ preceeding the directory location
I want ot do this for variables in TestStand and also for pats in LabView.
Cna somebody provide me with the correct syntax, for example if
my seq file is C:\User\Test\myseq.seq
and I want to open an ini file located in
C:\Config\config.ini
Should I save the path for the variable as
..\..\Config\config.ini ?? 
Thanks,
-D

1) If you want to use a relative path that is resolved the same way as a module path (i.e. using the teststand search directories where looking in the same directory as the sequence file is one of the default possibilities) you can do something like the following:
FindFile("..\\Config\\Config.ini", True, Locals.absolutePath)
2) RunState.SequenceFile.Path actually includes the sequence file's name, so if you want to build a path from that you would need to do something like the following to parse out the part of the path you care about (though maybe an extra ".." instead of doing this parsing works to get past the file name too, I've never tried that. Perhaps either way is fine.):
Locals.absolutePath = Left(RunState.SequenceFile.Path, Find(RunState.SequenceFile.Path, "\\", 0, False, True) + 1) + "..\\Config\\Config.ini"
3) Whether or not you need to build an absolute path or can use a relative path depends on what you are doing with the path, if you provide more details on what you are doing with the path we can let you know. In general, you should not use a relative path when calling a win32 API.  See the remarks section of the following where it says, "Multithreaded applications and shared library code should not use the GetCurrentDirectory function and should avoid using relative path names.":
http://msdn.microsoft.com/en-us/library/windows/de​sktop/aa364934%28v=vs.85%29.aspx
Though if you are calling a TestStand API then a relative path might be ok, depending on the API call, because some teststand APIs can use the TestStand search directory algorithm to resolve the path (basically the equivalent of 1 above).
Hope this helps,
-Doug

Similar Messages

  • How to copy file to another server from database using FTP in oracle

    How to copy file to another server from database using FTP in oracle.
    Please do the needfaul.

    Billy  Verreynne  wrote:
    BluShadow wrote:
    Not to mention that some FTP servers can return more than one return message per operation whereas others may return one message for the same operation.I had the problem using the LIST command to determine if a file exists on the server. Cannot be determined via the FTP server's return code. Which means parsing and checking the text response from the server to the command. And this vary from server to server.
    But the basics were quite easy to code. The entire package is 500 lines, includes comments and blank lines for formatting, and supports the basic FTP client command set. Not really a complex piece of software to write - but I found that many developers seem to think that writing network socket software is complex. Not really the case...Mine's a big larger, but incorporates functionality similar to what Chris provided in his, such as being able to use SQL to query a remote file using pipelined functions, or functionality to write the results of a query directly to a remove file.
    :)

  • How to load file thru reader which contains non-english char in file name

    Hi ,
    I want to know how to load file in english machine thru reader which contains non-english chars in file names (eg. 置顶.pdf)
    as LoadFile gives error while passing unicode converted file name.
    Regards,
    Arvind

    You don't mention what version of Reader?  And you are using the AcroPDF.dll, yes?
    Sent from my iPad

  • Download multiple files in one step

    Hi,
    my first try with acrobat.com with uploading some pictures which I like to share with friends led me to the question, how they can download my 18 pictures in one step. I put them in a workspace and gave them access. You can mark all files, but there is no menu point which offers you to download all files in one step.
    Is there a way to do this in one step?
    Greetings
    Mario

    Hello Mario,
    Thank you for posting. Unfortunately, there is currently no way to download multiple files at once; this functionality is high on our list of planned enhancements, so I encourage you to stay tuned for future releases.
    Best regards,
    Rebecca

  • How to load master data and hierarchies from R/3 systems

    HI all,
    how to load master data and hierarchies from R/3 systems.
    Please explain the steps.
    Thanks,
    cheta.

    HI,
    Its normally done following: Transferring the master datasources in RSA5 to RSA6 and then replicating the DS into BW and assignment of DS to Infosource and cretaion of Infopackage and load it into the master tables.
    Generally, the control parameters for data transfer from a source system are maintained in extractor
    customizing. In extractor customizing, you can access the corresponding source system in the source
    system tree of the SAP BW Administrator Workbench by using the context menu.
    To display or change the settings for data transfer at source system level, choose Business
    Information Warehouse → General Settings → Maintaining Control Parameters for Data Transfer.
    Note: The values for the data transfer are not hard limitations. It depends on the DataSource if these
    limits can be followed.
    In the SAP BW Scheduler, you can determine the control parameters for data transfer for individual
    DataSources. You can determine the size of the data packet, the number of parallel processes for
    data transfer and the frequency with which the status IDocs are sent, for every possible update
    method for a DataSource.
    To do so, choose Scheduler → DataSource → Default Settings for Data transfer.
    In this way you can, for example, update transaction data in larger data packets in the PSA. If you
    want to update master data in dialog mode, smaller packets ensure faster processing.
    Hope this info helps.
    Thanks,Ramoji.

  • How to load data to a cube from multiple infosources ?

    Hi friends,
    How to load data to a cube from multiple infosources ? could u please answer this question .
    thanks in advance......

    Hi ,
    say for example you need to load data to 1 cube from 3 info sources:
    1) You need to create 3 update rules for the Cube.
    2) Each time you create the update rules. Mention the name the name of the Info source. and create update rules correspondingly.
    Regards
    satish
    Message was edited by:
            satish murthy

  • How to browse files in time capsule from outstate?

    how to browse files in time capsule from outstate?

    I presume by outstate you mean remote access ie from internet in a different location??
    If so google for remote access time capsule.
    It is simple if you have TC setup as the main router and a static public IP.
    Just go to finder, go, go to server and type in AFP://IPofTC
    The TC has to be checked to allow wan access and use a decent password as the security for AFP is poor.

  • How to refresh components of one jsf from another jsf (partialTriggers)

    This thread begins here:
    How to refresh components of one jsf from another jsf (partialTriggers)
    My apologies for post in other forum and thanks Frank for reply.
    I found a solution before read your post. I'm newbie and I ignore the use of colons. So, for do the problem that I explain in my post I must to change this code:
    public backing_home () {
    content = new RichPanelGroupLayout();
    content.setRendered (true);
    String[] partialTriggers = {"menu:menuItem1", "menu:menuItem2", "menu:menuItem3", "menu:menuItem4"}; //All id's of menuItems of the menuBar in menu.jsp
    this.content.setPartialTriggers(partialTriggers);
    Note that now I don't pass the item ID only. I add "menu:" before the ID. This allows to acces to name container ('menu' is de ID of subview). And that's all. This works!!
    Anyway, I test your propuse Frank. Thank you!
    Westh

    Westh,
    Yes this code appears to be correct. Was that your question?
    --Ric                                                                                                                                                                                   

  • How do you return back one record from a NamingEnumeration

    how do you return back one record from a For Loop issue
    Posted: Jan 4, 2007 9:13 AM Reply
    I have the following piece of code and i want to be able to just return one item...
    that is return e.next(); but this line doesnt work for below what is wrong
    if (attrs == null) {
    System.out.println("No attributes");
    } else {
    /* Print each attribute */
    for (NamingEnumeration ae = attrs.getAll();
    ae.hasMore();) {
    Attribute attr = (Attribute)ae.next();
    System.out.println("attribute: " + attr);
    /* print each value */
    for (NamingEnumeration e = attr.getAll();
    e.hasMore();){
    System.out.println("value:- " + e.next()));
    return e.next();
    }

    At the end of the loop, the NamingEnumeration has no more elements. You need to call getAll() again.
    By the way, please use code tags (above the posting box). You've been here long enough to know that (judging by your registration date).

  • How can I get one value from local machine registry

    how can I get one value from local machine registry, I would like read one value of regitry. I have windows NT workstation. I need it to find the full path of iexplore.exe, this value is in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE'
    Thanks.

    You can use the D2KWUTIL.pll library to read/write to the registry. You have to install the forms examples to get the library.
    The library d2kwut32.dll must also be installed at the clients.

  • How can I transfer only one song from itunes to my iphone?

    How can I transfer only one song from itunes to my iphone without sync ( the whole library)?

    Untick every thing you dont want to transfer, tick only the ones you do want to transfer.

  • Why while in Bridge Load Files into photoshop Layers does not work?

    In Bridge, Tools>Photoshop>Load Files into Photoshop Layers does not work.  I have two images selected and when I execute that comman in Bridge nothing happens.  I exited and restarted both PS and Bridge and still nothing.  I am working in Windows 7 and Photoshop cs6.

    No I tried File/scripts/load file into stack and still did not work.
    There was an update to bridge and now it works.  Thanks so much.

  • How to load files from old external hard drive to new PC

    Copied files from old PC (Windows XP) to external hard drive. Purchased new PC (Windows 7). Paid technicians to transfer files from old PC to new PC. Some files were lost in the process.
    Please walk me through (step by step) on how to load spicific files from an external hard drive onto my new PC.
    Thanx, rp1

    Click anywhere on the open desktop so that the Finder menus are displayed at the top of the screen.
    Click Go > Network
    Double click the Time Capsule icon, then double click the icon representing the drive to mount it on the Mac's desktop. It is named "Data" unless you have changed it
    You can drag/drop files to the "Data" icon on the desktop
    235 GB is going to take forever if you try to do this using wireless. If at all possible, connect an Ethernet cable from your Mac to one of the LAN <-> ports on the Time Capsule.
    Even using Ethernet, you are probably looking at 10-12 hours for the file transfer.  All bets are off with wireless only, but a guess would be several days....or even more.

  • SQL*Loader - How to load only a few columns from a .csv file to ora table

    Hi there,
    Could anyone please let me know how to load few columns from a .csv
    file into a oracle table using SQL*Loader.
    I know how to create a .dat and .ctl file and run the sql loader.
    Suppose I have a .csv file with
    col1, col2, col3, col4
    and I only need to load col1 and col3 into col_a and col_b respectively
    in table_a?
    structure of table_ a
    col_a,
    col_b
    Please advice

    Try like..it i will work..
    LOAD DATA
    INFILE 'test.txt'
    LOAD DATA
    TRUNCATE INTO TABLE T1
    FIELDS TERMINATED BY ','
    (col1,
    col2 FILLER,
    col3,
    col4 FILLER
    )

  • How to load data into an infocube from a flat file

    HI friends,
    Iam a learner of bw.
    I have master and transaction data to load into an info cube.
    I think we can load master data first, and then transaction data. that is master data we have to load through direct or flexible update and then transaction data through flexible update by preparing 2 excel sheets( one for master data and other for transaction data)
    Or
    can we load both at a time by preparing a single excel sheet which covers the values of characteristic, attributes and key figures.
    sai
    sai

    Hi Sai,
    Please find your replies below -
    I have master and transaction data to load into an info cube.
    >> You load master data in InfoObejcts and Transaction data in Cubes. So first Identify the Master data InfoObjects & InfoCubes<<
    I think we can load master data first, and then transaction data. << Yup good practice is to load master data first & then transaction data<<
    that is master data we have to load through direct or flexible update << you need to look into your scenario which one are you using??<<
    and then transaction data through flexible update by preparing 2 excel sheets( one for master data and other for transaction data) << Yup I think you will need separate file - Master data one for InfoObejcts data load & transcation data one for InfoCube data laod>>
    Or
    can we load both at a time by preparing a single excel sheet which covers the values of characteristic, attributes and key figures.
    Hope it helps
    Regards
    Vikash

Maybe you are looking for

  • Acrobat Standard 9.1.2 update problem?

    I'm running Acrobat Standard 9 on Windows Vista Ultimate. Right after installing the Acrobat 9.1.2 update, but before restarting my system, I tried to open a PDF file, and experienced cascading file openings, where Acrobat seemed to be trying to open

  • Not charging nokia 5530 xpress music

    I have a 5530 xpress music less than a year old. it won't charge, bought new charger and battery, charged one time with new charger but after deleting  meassages after saying memory full  won't do anything now ,. Any ideas

  • Whats wrong with the compilation?

    Dear all, I have a jsp file and when I check the codes, I dun see anything wrong with it. It gave me an error of below: C:\jakarta-tomcat-3.3.1a\work\DEFAULT\ROOT\AdvanceSearchResult_1.java:7577: Method popBody() not found in class javax.servlet.jsp.

  • Wireless ip scheme

    Quick question:  Any negative impact on placing the user wireless DHCP scheme onto the same vlan used for WAP's ip scheme?  Or is it better to place the users onto a different vlan? Thanks Larnel

  • Update was terminated in MC94

    Dear Friends, We are uploading sales planning data to infostructure S906. The uploading process includes BDC program for MC94 transaction where we specify data in legacy file and same is uploaded through BDC program. Last week, when we executed the p