01-23-2013 08:51 AM
Hello, i have to save a file in a particular directory.
well, i have 3 subdirectory 🙂
the main directory correspond to the year when i made a test (it must be "0" for 1990, 2000 is "A" and so on.)
the subdirectory is the month (january is "1"---> December is "C")
the one another directory is the day from 1 to X (for the 31th day)
each time i run my program i have to control if the folder(s) exist, if it/they doesn't/don't exist i have to create it/them.
and save my file into the correct folder obviusly.
Some idea? 🙂
01-23-2013 10:40 AM
Try the attached. Note that as you stated your year and month to be in hex, I also made the day in hex. You need to give this program the path where the year folders should be, the name of the file you wish to save and the string text that you want saved. It will then create your desired folder structure based on the current timestamp and save the data to a text file.
01-23-2013 10:53 AM
I forgot that you said you are in LabVIEW 7.1. Unfortunately I can only save back to LabVIEW 8 so I have attached an image of my block diagram with the functions labeled. Hopefully this will suffice to get you what you need.
01-23-2013 11:01 AM
OpenG has a really good Create Dir if Non-Existant VI. Try to give it a look.
01-23-2013 11:02 AM
I am in the same boat as Charles, so its in version 8.0.You can post it in the version conversion board and get it converted.
From what I understand, you dont mean hex but after 9 you want to start from A. Here is my version but in 8.0!
01-23-2013 11:04 AM
I really wish NI would push the OpenG lib directly into LabVIEW. I hesitate to suggest solutions with it here in this forums as most newcomers don't want to fiddle with VIPM and installing additional packages.
01-23-2013 11:19 AM
Well, I should also point out that you only need to create a folder once (the lowest folder). The Create Folder function will create the entire directory structure needed to make a folder. I tested this with 8.2.1. Not totally sure if it works the same with 7.1.
01-24-2013 07:20 AM - edited 01-24-2013 07:20 AM
i can't use openG library 😞
and it's correct...it's not a hex code, it's similar but it's different...hex is max F, my needs is go also after the F
@aCe i put your vi's in convert forum...i'm waiting for a reply
02-01-2013 03:29 AM
Why can't you use the openG library? It seems it would solve your problem.
-CC
02-06-2013 01:18 AM
.aCe in version conversion told me that one subVI is missing 😞