#1 Burning Software

It is currently Thu Mar 28, 2024 8:32 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Preserving directory structure with FileTree_Add
PostPosted: Tue Dec 04, 2007 10:39 pm 
Offline

Joined: Tue Dec 04, 2007 10:32 pm
Posts: 3
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!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 05, 2007 7:35 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 05, 2007 4:32 pm 
Offline

Joined: Tue Dec 04, 2007 10:32 pm
Posts: 3
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!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 06, 2007 9:16 am 
Offline

Joined: Fri Jan 26, 2007 4:31 pm
Posts: 452
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group