01-24-2014 09:18 AM - edited 01-24-2014 09:44 AM
EDIT:
I am trying to build a string array into a path, however it ends up not being formatted correctly. Perhaps this is a "scan code" issue with the backslashes?
Is there a better/correct way to do this? I want to just change the file name of an already existing path.
For example:
c:\Desktop\Folder\File1.csv
becomes
c:\Desktop\Folder\FileName.csv
My "Spreadsheet String" is just a Path to String of an existing file path in the same destination folder.
I break the old path (in string form) into an array seperated by the slash. Then I replace the last array element (the file name). Then I make it an array again and convert it to a path. Although it looks correct, LabVIEW throws an error with this path saying it does not exist.
Solved! Go to Solution.
01-24-2014 09:47 AM
Is this what you're looking to do ?
appended path = c;\desktop\folder\filename.csv
01-24-2014 09:49 AM
That looks about right. However I am unfamiliar with that first function. Could you please link me to the help document for it and maybe explain what it does?
01-24-2014 09:52 AM - edited 01-24-2014 09:55 AM
Both functions are in the File I/O palette. Strip Path & Build Path.
You can turn your context help on with Ctrl + H to see the details
01-24-2014 09:56 AM
Ah, yes! Thank you! The Strip File Path function did exactly what I needed in a very robust way. I cannot believe I had never come across that function before. It would have saved me much struggling 😛
01-24-2014 09:59 AM
Yes there are some little gems hidden in them there palettes !
Thanks for the kudos ...