[dba-Tech] The Command prompt line length

Jim Lawrence accessd at shaw.ca
Sun Jul 19 17:55:37 CDT 2009


Hi All:

Has anyone heard of there being a limit of a line length within a batch
file?

I have a batch file that creates a directory and writes some backup data to
it. This batch file works fine on other computers but on a specific computer
the batch files fails on a longer line (64 characters). If the same line is
run in direct mode no problem.

The syntax is correct because if the line is cut and pasted to a command
prompt the line functions correctly. The rest of the batch file runs fine
without that one line... so it is related exclusively to the one line of
code.

Putting that one line of code into a batch file and then running it results
in the same error. It appears that it is not buffering the whole line before
attempting to run it.

If anyone has run across this type of issues before and hopefully found a
solution please pass it on.

TIA
Jim

PS the cmd line of code is:
for /F "tokens=2-4 delims=/ " %i in ('date /t') do set dt=%k%i%j  




More information about the dba-Tech mailing list