Skip to content

Instantly share code, notes, and snippets.

@mylenbro
mylenbro / swift-compile.bat
Created October 30, 2021 14:53
Bat file that compiles Swift on Windows.
@echo off
:: Gets all filenames in one line
SETLOCAL EnableDelayedExpansion
set FILELIST=
for /f "delims=|" %%f in ('dir /b *.swift') do ( set "FILELIST=!FILELIST! %%f")
set FILELIST=%FILELIST:,,=%
:: Current folder
:: FOR /F %%i IN ('cd') DO set DIRECTORY=%%~nxi