Answer» For creating a log file i have to combine text and the result of the copy command in 1 text line in a new file.
now: echo %varname% >> LOGFILE copy x Y >> logfile
this result in two lines in the logfile varname 1 files copied
is it possible to connect it to get the following result:
varname ; 1 files copied
1 line in the logfileMost versions of DOS do not have an echo command that will supress newline. This means that any echo command will automatically move to the next line.
You can create your own version of echo that supresses newline with the following command
ECHO ,8P_,FPZ0U]0U[,B0EWP_[[email protected][email protected]O!A>%TEMP%.\echoit.com
This creates a quick assembly file called echoit.com in your %temp% directory.
Then change your commands that USE echo command to use echoit instead. So something like
ECHO OFF ECHO ,8P_,FPZ0U]0U[,B0EWP_[[email protected][email protected]O!A>%temp%.\echoit.com %temp%\echoit %varname% ;>> logfile copy x Y >> logfile del %temp%.\echoit.com ;DELETE the program when we are done with it.
You don't have to create and delete the file each time. You could just make it once but then your batch would be specific to the one machine that has echoit.com on it. Thanks, it works fine
|