Rocket Division Software http://www.starburnsoftware.com/forum/ |
|
Preserving directory structure with FileTree_Add http://www.starburnsoftware.com/forum/starburn-sdk-f3/preserving-directory-structure-with-filetree-add-t1200.html |
Page 1 of 1 |
Author: | tarne [ Tue Dec 04, 2007 10:39 pm ] |
Post subject: | Preserving directory structure with FileTree_Add |
Hello, Is there anyway to add a single file to burn and preserve the directory structure? For example I want to burn the file C:\backup\12042007\file1.txt to the DVD, I want it to go on the DVD as \backup\12042007\file1.txt. I've tried using StarBurn_ISO9660JolietFileTree_Add and specifying C:\backup\12042007\file1.txt as the absolutepathandname, but it puts the file in the root of the DVD. I tried passing values in rootdirectorynewname and that doesn't seem to create directories, but just rename the file on the dvd. I am looking to create a generic function so I can just call it with a directory/file path and file and it will create all the directories and the file on the dvd. I don't want to add the entire directory because I only care 1 or 2 file in each directory. Do I need to do this in a multistep process? First call StarBurn_ISO9660JolietFileTree_Add with only the directory and then call it again with the directory and filename? Thanks! |
Author: | anton (staff) [ Wed Dec 05, 2007 7:35 am ] |
Post subject: | |
Take a look at BuildImage sample. Actually _Add(...) should work exactly in the way you expect - recursivelly add all listed subdirs. Make sure you pass correct parameters (as in the sample). If you'll still have problems - let us have the snippet of the code and we'll take a look. P.S. Of course it's possible to add folder items one-by-one but it's overkill in the current case. |
Author: | tarne [ Wed Dec 05, 2007 4:32 pm ] |
Post subject: | |
Anton, Thank you for the quick response. I have been using the BuildImage sample to try and get what I need working. I'm hard coding functions to try and see the behavior I need. Code: l__EXCEPTION_NUMBER :=
StarBurn_ISO9660JolietFileTree_Add( l__PVOID__ISO9660JolietFileTree, PCHAR( @l__CHAR__ExceptionText[1] ), sizeof( l__CHAR__ExceptionText ), l__ULONG__Status, 'C:\temp\file.txt', nil, FILE_TIME_LAST_WRITE, l__PVOID__Root, l__PVOID__NewNode ); The above creates file.txt in the image in the root. What I want to do is have it create it in the same directory that it is on disk. So it would be created as \temp\file.txt in the image (not \file.txt). I also tried to add just the directory, 'C:\temp'. But when I do that it automatically scans the directory and adds all the files, which I do not want. Thanks! |
Author: | andrey(staff) [ Thu Dec 06, 2007 9:16 am ] |
Post subject: | |
Hello, For example for add "c:\Temp\SubFolder\file.txt" and save folder structure you must call functions in next sequence: pParentNode = StarBurn_ISO9660JolietFileTree_GetRoot( ISO9660JolietFileTree ); StarBurn_ISO9660JolietFileTree_Add( ISO9660JolietFileTree, (PCHAR) (&ExceptionText), sizeof(ExceptionText), &ulSystemError, NULL, "Temp", FILE_TIME_LAST_WRITE, &ParentNode, &NewChild ); pParentNode = pNewChild; StarBurn_ISO9660JolietFileTree_Add( ISO9660JolietFileTree, (PCHAR) (&ExceptionText), sizeof(ExceptionText), &ulSystemError, NULL, "SubFolder", FILE_TIME_LAST_WRITE, &ParentNode, &NewChild ); ParentNode = NewChild; StarBurn_ISO9660JolietFileTree_Add( ISO9660JolietFileTree, (PCHAR) (&ExceptionText), sizeof(ExceptionText), &ulSystemError, "C:\\Temp\\SubFolder\\file.txt", NULL, FILE_TIME_LAST_WRITE, &ParentNode, &NewChild ); Please attention look on 5 and 6 parameter of ISO9660JolietFileTree() in this example. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |