Floppy emulator (SD card)

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

Re: Floppy emulator (SD card)

Postby XorA » Sat Mar 22, 2014 8:39 pm

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)

Postby IanJ » Sat Mar 22, 2014 9:34 pm

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.



Who is online

Users browsing this forum: No registered users and 5 guests