[dba-Tech] The Command prompt line length

Bobby Heid bheid at sc.rr.com
Sun Jul 19 19:39:13 CDT 2009


Jim.

Is it possible that when the line is expanded internally that it is too
long?  I don't know where %i is pointing to, but my guess is that the folder
that %i is pointing to is pretty long.

Bobby

-----Original Message-----
From: dba-tech-bounces at databaseadvisors.com
[mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
Sent: Sunday, July 19, 2009 6:56 PM
To: 'Discussion of Hardware and Software issues'
Subject: [dba-Tech] The Command prompt line length

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  

_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com





More information about the dba-Tech mailing list