| |||||||
| Commercial message | |
| | |
|
![]() |
| | Thread Tools |
| | #4 (permalink) |
| New on Forum Join Date: Apr 2004
Posts: 9
| create subdirectory on cd Is your code is for VB? If it is, doesn't matter. What I know is for VC, but I think it still will help you. Create a subdirectory on CD is just as iterate in a directory. What you need to add is the operation with NERO_ISO_ITEM variables. You should use a tree of NERO_ISO_ITEM variables to take the information of your directory tree. This is a code section is C++. //////////////////////////////////////////////////////////////////////// // Use this function to recursively collect information about all // // files and directories from a directory specificed by parameter // // lpszStartPath. // //////////////////////////////////////////////////////////////////////// NERO_ISO_ITEM* BurnDialog::NeroBuildIsoTreeFromPath( LPCTSTR lpszStartPath ) { NERO_ISO_ITEM *pIsoItem = NULL; NERO_ISO_ITEM *pPreviousIsoItem = NULL; CFileFind finder; TCHAR szSubPath[_MAX_PATH]; wsprintf(szSubPath, "%s\\*.*", lpszStartPath); BOOL bWorking = finder.FindFile( szSubPath ); /* BOOL bWorking = finder.FindFile( MakePath( lpszStartPath, _T("*.*") ) ); // remark: the MakePath function simply concatenates the two input strings, // inserting a backslash in between if appropriate */ // do-loop over all records in the temporary directory: build iso item tree while( bWorking ) { bWorking = finder.FindNextFile(); // skip "." and ".." files; otherwise, we'd recur infinitely! if (finder.IsDots()) continue; // Create this Iso Item no matter it is a file or a directory. // We can consider this Iso Item as a node in the tree. Then at // below, we will fill information to this node and create its // child node or brother node. pIsoItem = NeroCreateIsoItem(); // will be freed by NeroFreeIsoItemTree lstrcpyn( pIsoItem->fileName, finder.GetFileName(), 251 ); lstrcpyn( pIsoItem->sourceFilePath, finder.GetFilePath(), 251 ); pIsoItem->isDirectory=finder.IsDirectory(); pIsoItem->isReference=FALSE; // collecting the items backwards was easier to code pIsoItem->nextItem = pPreviousIsoItem; // exchange pointers pPreviousIsoItem = pIsoItem; // recurse if ( finder.IsDirectory() ) pIsoItem->subDirFirstItem = NeroBuildIsoTreeFromPath( finder.GetFilePath() ); } finder.Close(); return pIsoItem; } If you copy this code section to note pad , you can see much clearer. If you still have problem, my e-mail:colorfulfantasy@sohu.com. |
| | |
| |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I want to create a boot cd and withs some menus show the cd content | RVillanueva | General Software | 7 | 04-05-2006 02:33 |
| NeroCMD SubDirectory | Lecter | Nero SDK Discussion Forum | 6 | 13-07-2004 08:38 |
| Example for create a CD with C# | guenni81 | Nero SDK Discussion Forum | 0 | 24-03-2004 22:42 |
| Need a example for create a CD with C# | guenni81 | Nero SDK Discussion Forum | 1 | 24-03-2004 22:18 |
| Files into a special subdirectory | PeterCD | Nero SDK Discussion Forum | 3 | 14-03-2004 09:39 |