LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Folder name length is limited in system exec

Solved!
Go to solution

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?

0 Kudos
Message 1 of 7
(3,152 Views)

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

 

Message Edited by Troy K on 05-05-2010 12:00 PM
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 7
(3,142 Views)

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.

0 Kudos
Message 3 of 7
(3,135 Views)
Solution
Accepted by topic author steady

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.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 4 of 7
(3,131 Views)

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.

0 Kudos
Message 5 of 7
(3,127 Views)

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!

Message Edited by battler. on 05-04-2010 10:45 PM
0 Kudos
Message 6 of 7
(3,107 Views)
It will only pop-up an error if you do not wire the error cluster AND have the automatic error handling enabled. As a beginner I would not suggest to you to disable automatic error handling, but you can always wire the error cluster and for instance clear the error for specific error codes, if you know that you do want to ignore a specific error. Error indicators on functions can and often do indicated an error that is fatal, but there are legitimate reasons to ignore specific errors sometimes, and being the programmer you have all the power to do so if you find it suitable.
Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 7
(3,062 Views)