LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating Directories (or not)

I want to create an empty directory "test". If it doesn't exist, create it and exit.

If it exists the VI should open a pop up window: "Delete it or not?". If YES delete it and create a new one and exit. If NO cancel the program and show a pop up "Program cancelled".

I attached a file with my ideas, but it doesen't work. If possible, make it work, thanks.

By the way: I use LabVIEW 6.1.

Thanks, Arno
0 Kudos
Message 1 of 5
(2,889 Views)
Arno

replace List Directory with File\Directory info and wire the directory boolean to your case statement. that should work for you.

Good Luck

Dan
0 Kudos
Message 2 of 5
(2,889 Views)
Looks like the problem is the List Directory function.

You have the path set to "d:\smeets\test". If that entire path does not exist, the function generates an error and will not return any values. So if the 'test' directory you are looking for is in the 'smeets' directory, you should have the initial path just set to "d:\smeets". This will then show if there is a 'test' directory and it seems to work as you want.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 3 of 5
(2,889 Views)
You've got several problems and most would have become apparent if you had wired up the error clusters. I would suggest that you go to www.openg.org and download the OpenG toolkit. There you will get additional file tools like Create Directory if Non-Existant and Delete Recursive that will delete a folder even it's not empty.
0 Kudos
Message 4 of 5
(2,889 Views)
Hallo,

thanks for all answers, Dan's hint works fine to me.

Arno
0 Kudos
Message 5 of 5
(2,889 Views)