I need to create cab file for nested folder .
so I sreate ddf file that looks :
.OPTION EXPLICIT ; Will Generate errors for mistakes
.Set Compress=on
.Set Cabinet=on
; Destination Folder
.Set DiskDirectory1= my Directory
; File name for the new cab file
.Set CabinetNameTemplate=Sample.cab
//----------------
now in the bat file I insert the list of all files to the ddf file :
cd %folderDir%
@echo off
call :treeProcess
goto :eos
:treeProcess
for /f "delims=" %%a IN ('dir /a:-d/b 2^>nul ') do echo %%~fa >>%pathDdfFile%
for /D %%d in (*) do (
echo .Set DestinationDir=%%d >>%pathDdfFile%
cd %%d
call :treeProcess
cd ..
)
goto :eof
:eos
cd \
//---------------
when I run :
makecab /F %pathDdfFile% /L C:\temp
its return me :
unexpected text : one file
all files that have space in there name make problem/ what should I do ?