How can I valid the path in different devices

I wrote a program using the PDA module months ago, I was now told to modify to make it robust in the sense that, the program with ‘run’ in any PDA.
There are several directories that are common with PDA’s, such as Storage, Storage Card, SD Card, MMC-SD Card e.t.c.
I previous used a Build Path to create the path I wanted that looked like this:
"Storage Card/S345220107.txt" where S345 is the user id and 220107 is the date from a time stamp VI.
What I want to do is to find a way of knowing what directory a PDA has somehow.
An algorithm of it will look some thing like this:
String aPath;
String pathToUse;
String[ ] path = new Path[4]; // An array
path[0] = "Storage" // First index
path[0] = "Storage Card"
path[0] = "SD Card"
path[0] = "MMC-SD Card"
public void setPath( String Path) {
aPath = path;
public String getPath( ) {
       return aPath;
I will use a For Loop to set the path, but what I don’t know is how to test each one.
In Java I can say:
if( aPath.equals(Storage)) {
        pathToUse = "Storage" + userId + date + ".txt";
System.out.println("valid Path");
else if ( aPath.equals(Storage Card)) {
            pathToUse = "Storage" + userId + date + ".txt";
            System.out.println("Valid Path");
else if ( aPath.equals(SD Card)) {
            pathToUse = "Storage" + userId + date + ".txt";
            System.out.println("Valid Path");
else if ( aPath.equals(MMC-SD Card)) {
           pathToUse = "Storage" + userId + date + ".txt";
           System.out.println("");
else {
          System.out.println("path not valid");
The pathToUse string is then used as the input to the Open/Create/Replace File VI.
Any ideas guys

Hi
I created the VI you sent, and for the first version, when there is a Match, it does not place the found folder name in the Start Path or the Current Path Indicators. So the path created is not correct
I then tried a second version called PathSearch1Vi and added a few things for it to do what I wanted. Please run both and see if the second version is OK or what should be added to the first version.
Thanks you very much for your help.
Attachments:
PathSearch.vi ‏25 KB
PathSearch1.vi ‏28 KB

Similar Messages

  • How can i get the path to config folder placed inside the jar file?

    Hi i have developed an RCP application using eclipse.
    In my application config directory is there.
    When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
    When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
    Will the config folder exists in local cache in my system?
    Help needed.
    -Deepak

    -- This works in CS6:
    tell application "Adobe InDesign CS6"
      set myDocument to active document
      set selectedRectangles to selection of myDocument
      set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
    --> "Macintosh HD:folder/folder/filename.tif"
    end tell

  • How can I get the path of an existing file????

    Hi.
    I'm a newbie in Jsp development, so this question may appear trivial.
    How can I get the path into a String of an exixting file ..like ...
    String thepath = path_of("my file.txt");
    Thanks for your help.

    Try
    application.getRealPath("myFile.txt")

  • How can I specify the path in Form Builder 9.0

    Hi, everyone,
    could anybody tell me how can I specify the path in Form Buidler 9.0? there is problems when I want to attach library in form builder. thanks to Kuldeep RAwat and Natalia Vidal, I know I should specify the path, but I still don't know how to specify, how can I do?
    besides, when I run a form, sometime there will be a warnig:
    Please acknowledge message
    what's that meaning?
    thank you very much for your great help

    Shay Shmeltzer thank you very much for your so quickly response. I have modified the file and my form can run now!
    but, when I open my form, it always suggest me:
    FRM-10102: Cannot attach PL/SQL library TalbotStandard. This library attachment will be lost if the module is saved.
    so everytime I open my form, I must attach the library manully. I don't know the reason. do you know that or anybody else knows that? thank you very much!
    have a good weekend :-)

  • The white background makes my eyes hurt. How can I make the background a different color?

    The white background makes my eyes hurt. How can I make the background a different color?

    http://www.itworld.com/development/351097/setting-active-menu-item-based-current-url-jquer y

  • How can i change the ringtone for different contacts.  "edit contacts" won't let me`??

    how can i change the ringtones for different contacts on the razor.  "edit contacts" wont allow me to

    Here is the Instructions your Looking For:  Down towards the Bottom of the Instructions shows how to set Ringtones for each Contact.
    How do I download and use ringtones on my DROID  Razr & RAZR MAXX?
    Quick links
    Set any of your songs on your SDcard as a phone ringtone
    Choose Phone ringtones through settings menu
    Customize the text message ringtone
    Assign a ringtone to a specific contact
    Download ringtones from Play Store      
    1. Set any of your songs on your SDcard as a phone ringtone:
    Touch Apps > My music
    While the music is playing, touch the phone Menu Key > More > Use as ringtone 
    The ringtone is set as your default incoming call ringtone and copied to your Phone ringtone list.       
    Note: The above instructions are for the My music player and not for other players such as Play music.      2. Choose Phone ringtones through settings menu:
    Press the Menu key
    Touch Settings
    Touch Sound
    Touch Phone ringtone  (If option is greyed out, make sure handset volume is not set to Silent Mode)
    Select a Phone ringtone from the list. Press OK to set. (Music files you have set as Incoming Call ringtone from your SDcard will be included in this list along with downloaded and preloaded ringtones.
    3. Customize the text message ringtone
    From the homescreen or from within the applications tray, touch Text messaging
    Press the Menu key (On the left with 4 squares)
    Touch Messaging Settings
    Touch Select ringtones (if option is greyed out, make sure Notifications is turned on / actived)
    Touch on any Notification ringtone to select and hear a sample.
    Press OK to set as notification ringtone
    CLICK HERE for instructions on creating your own custom ringtone for Text Messages
    4. Assign a ringtone to a specific contact:
    Press Contacts icon on homescreen or tap on Contacts application from the Applications Tray
    Touch and select the specific contact
    Press the menu key
    Touch Options
    Touch V (down)  icon next to Ringtone
    Choose a Phone ringtone from the list and tap OK to set.
    Note: To assign a music/song from your memory card as a ringtone, first follow step1 above and follow step 4 again. 5. Download ringtones from the Play Store
    From the applications menu, touch Play Store
    Touch search  to search for ringtones.
    Answers others found helpful
    How do I setup and use Bluetooth on my DROID RAZR MAXX?
    How do I transfer files to/from my DROID RAZR MAXX?
    How do I set up and use the Smart Actions application using the DROID RAZR MAXX?
    How do I use the DROID RAZR MAXX for video chat?
    How do I force my DROID RAZR MAXX to reboot or restart?

  • How can I run the report for different input values at the same time?

    Reports version: Report Builder 6.0.8.13.1
    Oracle version: Oracle8i Enterprise Edition Release 8.1.7.0.0
    I want to run the same report for different input parameter values and spool each o/p to different file and ftp to a server. For this, as a first step, I am spooling different input values in to a file, reading those values through a loop and calling the report for that input values. Each report run/execution is taking 15 minutes. Total report execution is taking approximately 4 hours (assuming 16 different input values) to complete. So I have to wait 4 hours to see ALL outputs.
    I would like to run the report parallel for ALL the input values and I should be able to see the ALL outputs with in 15 or 16 minutes.
    In my shell script, I added & symbol at the end of the report call to start/run the job in the background. Due to this the control passed to the next step after the report call. At this place I have an ftp command to send the output file to a different server and it is giving error some thing like “o/p file is not available/created yet". This is due to the fact that report writer is NOT yet completely started/initiated or it is NOT completed the spooling.
    How can I run the report at the same time for all the input values and save the time?
    Thanks in advance.
    Kishore.

    Increase the number of server engines running right now it seems there is only one engine running ,increase it to 4 or 6
    and then atleast 4 or 6 reports will run simultaneously.
    For FTPing the output add to your sript to check whether it is locked and if not then only try to ftp .
    Also for more better functionality read the document (chapter 15 ) for 10g reports for its new fuinctionality.
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/toc.htm
    Thanks
    Subodh

  • How can i change the path for uploadin videos??

    i m using javax.servlet.servletcontext for setting the path for storin upload videos...
    by using the getrealpath able to store videos in web-inf file...
    how can i change the location...

    this is the part of code in which i want to change my storage location:
    ** * The base path corresponds to the base directory of the
    * application context's WEB-INF directory. This means that
    * this directory is NOT visible to the end user.
    public static String getBasePath(javax.servlet.ServletContext context)
    { return context.getRealPath("/") + "WEB-INF" + directorySep;}
    /** * The temporary directory used to store files while they are
    * being uploaded. */
    public static String getTempPath(javax.servlet.ServletContext context)
    { return getBasePath(context); }
    /** * Gets the upload directory - used to indicate the local file
    * system storage area.
    can u tell me now how to change the context value???
    and how to change the storage loction??

  • How can I make the paths visible in a composite pattern created via the Swatch Palette?

    I created a swatch, used it to make a large composite pattern.  I can't find the paths.  They are needed so that
    a laser cutter can follow them for production.  What am I missing?

    Try selecting everything with the pattern and use Expand (or Expand Appearance, which ever is available) from the object menu. You might need to cleanup quite a lot depending on how you constructed the paths in the original pattern tile.

  • How can we valid the supevisor's CAI?

    Hi All,
       I have a selection screen which has input parameter as Supervisor CAI>>.
    Whenever a CAI is entered we have validate whether the CAI is a Supervisors CAI?
    If yes we have to display the subordinates under him?
    Please let me know how can I validate the supervisor... using which table?
    Regards,
    Shashank.

    There is one possible way but it is not all that slick.
    You set up the three "sub" characteristics with automatic defect recording.  Any out-of-spec result will create at least one defect for the characteristic(s).
    You set up the "summarized" characteristic as a calculated characteristic with a spec of 0 (zero).
    In the formula specify C40010 + C40020 + C40030. 
    C4 is the number of defects for the characteristic.  Any value greater then zero will make this value out-of-spec.
    Thus, if any of the sub characteristics are out--of-spec, the related calculated characteristic will also be out-of-spec.  The value for the calculated characteristic would be the number of defects... 1, 2 or 3 probably.
    In the UD, the characteristics that are out-of-spec are usually displayed right on the first screen, (chars relevant for the UD).  That is standard, SAP delivered out of the box, unless some has changed the config for the UD screen on you.
    Craig

  • How can i change the orientation of different pages in a Pages document?

    How Can I change the orientation of a single page in a Pages document?

    You can't. It has never been an available feature in any Pages version. you have to rotate the content on the page.

  • HT1420 How can I see the list of authorized devices?

    I recently had problems with my computer and in the middle of that, it said that iTunes was no longer working. I uninstalled it and then later reinstalled it once I figured out what was wrong with my computer. Now when I opened iTunes under the same username, it is not showing my songs. It is also saying that I have to authorize the computer yet says I am at my limit of 5. How can I see the list of devices so that I can edit it?

    There's none accessible from your end. If needed, use the Deauthorize All function.
    (90595)

  • How can I get the path name and rename it?

    I Hope someone who knows more about automator than I can help me out here. What I'm trying to do is get the path file name, while also changing part of it. Here is my example:
    I can get the path name with this "Get Path" script I found http://automatorworld.com/archives/get-path/all-comments/
    It does half the job so I just need to tweak it but know how. When I get the path this is what I'll get: /Volumes/Public/Creative Services/Campaigns/2010/NCDDiv-32CDV Upgrade/NCDDIV-32Versions.xls
    I need to remove the beginning part"/volumes" to "file://///nhmanmkt01"
    This is so I can send the path from our sever where we keep our files to my windows friends so they can open it.
    Thanks for any help you can provide!

    ok, make the following workflow.
    1. get selected finder items.
    2. run shell script
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    for f in "$@"
    do
    echo "$f"|sed 's%/Volumes%file://///nhmanmkt01%'
    done</pre>
    set the script to accept input as arguments
    3. copy to clipboard
    save it as a finder plugin.

  • How can I set the PATH properly in XP?

    Ive stuffed around for hours trying to do this. Ive installed j2eesdk-1_4_2004Q4-beta-windows.
    I wrote a simple app in jGrasp, then hit compile and it comes up with
    "package javax.ejb does not exist
    import javax.ejb.*;"
    Now my PATH looks something like this
    C:\Sun\AppServer\bin;C:\Sun\AppServer\jdk\bin;C:\Sun\AppServer\lib\j2ee.jar;
    this just doesnt work....
    Can someone who writes j2ee apps in XP plz let me know how to set up the class path so i dont get these package not found errors.
    It would be a great favour, thank you.
    PS when i move the j2ee.jar file into the jre\lib\ext folder it compiles, but this seems dodgy to me. Plz help me.

    Either set the classpath pointing to j2ee.jar when building your app (javac -classpath ...\j2ee.jar) - if you are using ant scripts to build, checkout the samples or blueprints applications for examples of how to set the classpath within ant scripts
    Or set your CLASSPATH environment to ...\j2ee.jar (My Computer->Control Panel->System->Advanced->Environment Variables
    Hope this helps

  • How can I see the path from the preview file (*.prel) to my video files ?

    Because a lack of hard disk space I have moved my video files to another drive and therefore unfortunately destroyed the relative connection to the preview file (*.prel).
    Therefore the videos are not to be seen in the preview file any more.
    How can I get information about the relative path between the preview file and the place for the original video files so I can get those back in the original position ?
    or:
    It may be possible to change the path for every clip in my preview file - but how ?
    I can read answers in English, German or Danish.

    hansk
    What version of Premiere Elements on what computer operating system?
    Generalizing for now...
    If you know where the files are by actually seeing them in their hard drive save location and you are getting "Where is the file ______?" messages, then you use those
    messages to reconnect the source media to the project. Are you getting those messages and have you tried for the reconnects that way?
    If edits are involved in the files that have become disconnected to the project, you can also consider the program's Replace Footage feature.
    ATR Premiere Elements Troubleshooting: PE11: Replace Footage
    Typically either of these ways is one at a time reconnects. With the "Where is the file _____?" message way sometimes you get lucky (depends on the circumstances) and more
    than one file at a time might reconnect.
    Please review and consider. Any questions or need clarification, please ask.
    ATR

Maybe you are looking for

  • My music files won't transfer to itunes...

    All of my music files from my hard drive are either mp3's or wma's that I have ripped from my own cd's. Why are some of them not transferring to my itunes library? what can I do to transfer them?

  • Kworker constantly using 15/20% of CPU since upgrade to 2.6.36-ARCH

    Hi, Since upgrading to 2.6.36-ARCH kernel I've noticed that my CPU has a constant load on one of the cores: kworker/0:1 shows as using 61% CPU usage on one core. I cannot seem to find out much about what kworker is and what logs I need to look at to

  • Where is the genius bar in ITunes 11.0.1?

    Can't seem to find the genius sidebar that recommends new tracks from the Itunes store. Anyone have any ideas on how to restore it to the left hand side of the screen?

  • Problem with two OC4J instances in Oracle 10g AS

    hi all, i am using windows XP(OS), Oracle 10g Application Server. when i create two instances of OC4j other than home instance, say instance1 and instance2 and deploy two different applications in two instances then i get "page not found" error. both

  • HT5163 SIM insert issue in ipad mini

    Dear Sir/Madam, I have purcheased ipad mini (Wifi + cellular) a week before. I am trying to pull out nano sim tray with sim tool given by apple. But i couldn't do it. I have seen video of how to insert sim card in youtube. same way only i did. But it