Cmd.exe command line restrictions

I was working on spooling a bat file from an oracle request that was copying content from one place to another,

Now the command that is generated has a length of more than 255 characters, for example

C:> copy x y ( where len (x+y) > 255)

How does this give an error, is there any work to manage such a situation in order to increase this team length?

PS Some paths + file names are longer than 259 characters, to which I found that there are fewer arguments

+2
source share
6 answers

subst, , , . , , , .

LASTDRIVE=Z
SUBST S: c:\this is a very long path name\source
SUBST T: d:\this is a very long path name\Target
#do whatever you need to, like
copy s:\filename T:\filename
SUBST S: /D
SUBST T: /D

/D .

+4

, DBMS_FILE_TRANSFER.COPY_FILE bat. bat ( ).

+1
  • SUBST ( )
  • 8.3 (, C:\Progra ~ 1\- )
  • ( Windows): copy \?\c:\verylongpath\verylongname \?\d:\anotherverylongpath\
+1

.cmd , .bat, Win95/98/ME. .

, , cmd-escape char ^ .

+1

; , .

0

, , , MAX_PATH. . , MSDN.

, . C:\Progra~1.

(Cmd. exe),

On computers running Microsoft Windows XP or later, the maximum line length that you can use on the command line is 8191 characters. On computers running Microsoft Windows 2000 or Windows NT 4.0, the maximum line length that you can use on the command line is 2047 characters.

0
source

All Articles