Page 9 of 9

Re: Floppy emulator (SD card)

Posted: Sat Mar 22, 2014 8:39 pm
by XorA
I suspect you need to get familiar with some scripting language! I think qltools -w blah -w blah -w blah works, but not qltools -w *

G

Re: Floppy emulator (SD card)

Posted: Sat Mar 22, 2014 9:34 pm
by IanJ
XorA wrote:I suspect you need to get familiar with some scripting language! I think qltools -w blah -w blah -w blah works, but not qltools -w *

G
Ok, here's a Windows batch file that will copy all files in a specific folder to a specific image file.
The batch file must reside in same folder as qltools.exe and per the 2nd last line of the code the image must reside in subfolder \images.

User will be prompted for image file name (full), and name of source folder (which also must be a subfolder).

Seems to work (Win7).

EDIT 24/03/14: The very latest version of the batch file & readme is available for download here:
http://www.ianjohnston.com/ql/QLcopy.zip

Ian.

Code: Select all

:: Batch QLTools to copy multiple files into image
:: Ian Johnston
@echo off
echo QLTOOLS BATCH COPY FILES TO IMAGE (by Ian Johnston)
echo ===================================================
echo root folder   = %CD%\
echo image folder  = %CD%\images\
set /p Imagefile= Image file name (i.e. myimage.HFE)?
set /p Sourcefolder= Source folder (i.e. files)?
setlocal disableDelayedExpansion
cd %Sourcefolder%
for /f "tokens=1* delims=:" %%A in ('dir /s /b^|findstr /n "^"') do (
  set "file.%%A=%%B"
  set "file.count=%%A"
)
cd..
setlocal enableDelayedExpansion
for /l %%N in (1 1 %file.count%) do (
  qltools images\%Imagefile% -W !file.%%N!
  echo !file.%%N!
)
qltools images\%Imagefile% -d
@pause