I've been working on spooling a bat file from a oracle query that would copy contents from one location to another,
Now that command that are getting generated are of lengths that are greater than 255 characters, e.g
C:> copy x y ( where len (x+y) > 255)
As this is throwing an error, is there a work around to manage this kind of situation to increase that command length?
P.S. Some paths+filenames are of length that are larger that 259 characters, to which I found that say there is less to argue
I don't think so; I'd write that to a file maybe.
You could use subst to name the two subdirectories your working from with drive letters. Obviously the are not real, but logical drives then, but you could substantially shorten the paths.
The /D parameter frees the association.
You may want to consider using DBMS_FILE_TRANSFER.COPY_FILE instead of creating a bat file. You can avoid using bat files (which are platform dependent) altogether.
Probably no, sounds like you're hitting the
MAX_PATH
limitation. See File Names, Paths, and Namespaces on MSDN.Possible workaround might be to use the short path equivalents, e.g.
C:\Progra~1
.According to the the following article Command prompt (Cmd. exe) command-line string limitation,
Try using a .cmd file, not a .bat file unless you are using Win95/98/ME. This could solve the entire problem right there.
If that doesn't do it, you can break a command by preceeding a line break with the cmd-escape char ^ or by wrapping the command in parentheses.