Batch-Script lässt die letzten 2 Zeichen beim echo weg
Ich habe folgendes Script:
wenn ich den Befehl nun ausführe wird folgendes in filenames.txt eingetragen:
('','image1','',''
('','image2','',''
('','image3','',''
('','image4','',''
('','image5','',''
usw.
Es sollte aber ('','image1','',''), dort eingetragen werden.
Warum passiert dies nicht?
@echo off
echo INSERT INTO `v1` (`id`, `img`, `name`, `evolves`) VALUES >> filenames.txt
for /R "C:\xampp\htdocs\website.local\img\images\v1" %%f in (*.png) do (
echo ('','%%~nf','',''), >> filenames.txt
)
pause
wenn ich den Befehl nun ausführe wird folgendes in filenames.txt eingetragen:
('','image1','',''
('','image2','',''
('','image3','',''
('','image4','',''
('','image5','',''
usw.
Es sollte aber ('','image1','',''), dort eingetragen werden.
Warum passiert dies nicht?
Please also mark the comments that contributed to the solution of the article
Content-Key: 639274
Url: https://administrator.de/contentid/639274
Printed on: April 24, 2024 at 13:04 o'clock
2 Comments
Latest comment