05-04-2010 07:39 PM
Hi all,
When I use system exec to creat folder, I find folder name length is limited as 8 characters. Is there a way to break this limit?
Solved! Go to Solution.
05-04-2010 08:58 PM - edited 05-04-2010 09:00 PM
How long is the full path?
Is it a network drive you're trying to create a folder in?
Does it work if you use the LabVIEW create folder function instead?
Owning Palette: Advanced File VIs and Functions
05-04-2010 09:50 PM
Thanks Troy, you remind me I should use VI instead of system execution.
It is around 10 or 11 characters. I use "command.com /C md ...." to creat, after failure, I searched on internet to find out DOS has limits of folder name length.
05-04-2010 09:59 PM
You were using the old "command.com" instead of the new "cmd.exe".
If you replace command.com with cmd.exe your original method would work.
Using the LabVIEW function would still be a better option though.
05-04-2010 10:09 PM
Thanks a lot, Troy!
The good side of CMD is that, I don't need to care if there already exists a folder I want to create. But for LabView, it will pop up error.
05-04-2010 10:43 PM - edited 05-04-2010 10:45 PM
It is much better to know if a folder exists. It only requires 1 extra step - to delete the existing folder first. It is better to display dialogs to the user. Any errors can be handled (suppressed and/or used as logic).
Use the Advanced File IO VIs. 1) Check if the folder exists. 2) If it exists OR the VI produces an error inform the user and give them an option (two-button dialog wired to case structure) whether to proceed. 3) Delete the existing folder (heirarchy=TRUE). 4) Create new folder.
I can't tell you the exact VIs to use because I dont have LV infront of me, but they're easy to find!
05-06-2010 03:04 AM