Quantcast
Channel: Emulators - World of Spectrum
Viewing all articles
Browse latest Browse all 477

Drag and drop files into a HDF-File under Windows with Batchfile

$
0
0
Maybe someone can make use of this:

"Drag and drop files into a HDF-File under Windows with Batchfile"

Even works with dragging files into a HDF-File which is running/opened in an Emulator.
REM Drag_and_Drop_to_Directory_TESTS_in_HDF-Files_HDFMAKER.HDF_and_HDFMAKER.RAW.bat
		REM v0.11, Luzie

SET hdfmonkeyexe=hdfmonkey.exe

SET Destination-Directory=\TESTS

%hdfmonkeyexe% mkdir HDFMAKER.HDF %Destination-Directory%
%hdfmonkeyexe% mkdir HDFMAKER.RAW %Destination-Directory%

	REM Drag and drop files into batch file
	REM https://www.dostips.com/forum/viewtopic.php?t=7783

@echo off
setlocal enableExtensions disableDelayedExpansion

	REM if using more than 9 arguments you may use the "shift" command
	REM echo Command line: %0 %*
	REM echo Command line argument 1: "%~1"

	REM https://ss64.com/nt/syntax-args.html
	REM The modifiers above can be combined: ~nx2 Expand %2 to a file name and extension only.
	
echo Command line argument 1: "%~nx1"

%hdfmonkeyexe% put HDFMAKER.HDF "%~1" "%Destination-Directory%\%~nx1"
%hdfmonkeyexe% put HDFMAKER.RAW "%~1" "%Destination-Directory%\%~nx1"

endlocal
goto :eof

Viewing all articles
Browse latest Browse all 477

Trending Articles