Skip to content

Commit 360f6d9

Browse files
committed
Added function to remove front/end spaces of sql query file path
1 parent c61a050 commit 360f6d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sql2excel.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ echo.
7070

7171
echo Enter the query file path (e.g., queries/my-queries.xml):
7272
set /p query_file=
73+
:: Remove leading and trailing spaces
74+
for /f "tokens=* delims= " %%a in ("%query_file%") do set query_file=%%a
7375
if "%query_file%"=="" (
7476
echo File path not entered.
7577
echo.
@@ -151,6 +153,8 @@ echo.
151153

152154
echo Enter XML file path (e.g., queries/my-queries.xml):
153155
set /p xml_file=
156+
:: Remove leading and trailing spaces
157+
for /f "tokens=* delims= " %%a in ("%xml_file%") do set xml_file=%%a
154158
if "%xml_file%"=="" (
155159
echo File path not entered.
156160
echo.
@@ -205,6 +209,8 @@ echo.
205209

206210
echo Enter JSON file path (e.g., queries/my-queries.json):
207211
set /p json_file=
212+
:: Remove leading and trailing spaces
213+
for /f "tokens=* delims= " %%a in ("%json_file%") do set json_file=%%a
208214
if "%json_file%"=="" (
209215
echo File path not entered.
210216
echo.

0 commit comments

Comments
 (0)