Answer the question
In order to leave comments, you need to log in
Why does *.bat script not work correctly?
Good day.
There is a bat-nick like:
for /f "delims=" %%i in (C:\FilesFor1C\userlist.txt) do msg %%i "%~1"
Answer the question
In order to leave comments, you need to log in
To check, add to the loop the output of the usernames to which messages are directed:
for /f "tokens=* delims=" %%i in (C:\FilesFor1C\userlist.txt) do (msg %%i "%~1" & echo .%%i)
I think that the problem here is rather in the work of msg, and not in your script.
And yet, check the encoding of the userlist.txt file and whether it contains Cyrillic usernames. For everything to work properly, the file encoding must match the batch file encoding.
enable logging.
@echo off
set LOG=C:\FilesFor1C\userlist.log
for /f "delims=" %%i in (C:\FilesFor1C\userlist.txt) do msg "%%i" "%~1"&&(echo %date% %time% [%%i] Send>>"%LOG%")||(echo %date% %time% [%%i] NOT Send>>"%LOG%")
Well, list them in the same order
INSERT INTO `table` (`ID`, `City`, `Color`)
SELECT `ID`, `City`, `Color`
FROM `users` WHERE `Name` = "Test"
// или если id не надо
INSERT INTO `table` (`ID`, `City`, `Color`)
SELECT null, `City`, `Color`
FROM `users` WHERE `Name` = "Test"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question