Floppy emulator (SD card)

Nagging hardware related question? Post here!
User avatar
XorA
Site Admin
Posts: 1368
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Floppy emulator (SD card)

Post 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


IanJ
200th!
Posts: 34
Joined: Fri Jan 17, 2014 8:07 pm
Location: Stonehaven, Scotland

Re: Floppy emulator (SD card)

Post 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
Last edited by IanJ on Sun Mar 23, 2014 4:54 pm, edited 1 time in total.


Post Reply