Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 15 4:06 am)
I think the ! exclamation point is the problem. DOS doesn't like most punctuation.
When I try it in a simpler situation (COPY "!poo" foo), it won't accept the ! even within quotes.
My python page
My ShareCG freebies
Try substituting the exclamation mark in the target filename with: %21
That might work.
(edit) nah, I just tried it in a Windows 7 Command Prompt window -- it didn't.
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
I'm curious as to why you need XCOPY anyway. Can't you just use the drag-n-drop
in Explorer?
My python page
My ShareCG freebies
The quote marks are needed to force the command to interpret directory names containing a space character as a single string, otherwise it will consider a space to be the separator between parameters. The /c switch is to suppress "confirmation" prompts when a copy hits a stumbling block (e.g. "overwrite yes/no" prompts").
Quote - I'm curious as to why you need XCOPY anyway. Can't you just use the drag-n-drop
in Explorer?
Two words: batch files :) As a script author this should have occurred to you.
Is this actually MS-DOS, or a DOS prompt on Windows 95 or earlier, or is it the command prompt from a newer version of Windows?
Under DOS, the maximum length of a command was 128 characters, and your line is 199 characters long. If you're up against the 128 byte limit, the program is going to lose everything to the right of it (including the second quotation mark) and it will only see this:
XCOPY /C "F:Poser Runtimetextures!DREAMSQUARESDreamyRealisticEyesDRE_Black.jpg" "C:Program Filese frontierOther Runtime
which, to DOS, consists of four arguments plus the switch, which would explain the error.
There was a setting you could add to CONFIG.SYS to extend the length of the input line for COMMAND, but I'd have to look it up. I'm not sure what the restrictions (if any) are on CMD, the command interpreter that newer versions of Windows use.
That hadn't occurred to me. There's another way to work around that by setting environment variables to contain the long strings and then referencing them by %NAME or something like that, but it's been a long time.
Thanks all for replying so far .....
As is often the case, I haven't explained myself properly. So allow me to clarify further :
(1) The XCOPY above is merely a sample line from a batch file that I created using Excel. That batch file contains hundreds of these XCOPY commands.
(2) Not all of these contain the exclamation mark ('!')
(3) I can't simply drag'n'drop in Explorer because the source folder (F:..textures..) contains thousands of files of which I am copying a few hundred.
(4) I am running the batch file from within a cmd box invoked from the command line in Win XP.
regards,
Andrew
Okay off the bat I get something different (XP 64):
C:Temp>xcopy /c "c:tempYay Bent.jpg" "c:temp!Yay Bent.jpg"
Does C:temp!Yay Bent.jpg specify a file name
or directory name on the target
(F = file, D = directory)?
not dependent on "!" character, I get the same with a different filename.
I don't think the command is that picky about parameter order, I get the same result whether the /c is first or last.
Quote - (4) I am running the batch file from within a cmd box invoked from the command line in Win XP.
What's the exact command you're using to run the batch file? Are you selecting the command interpreter from the accessories menu, or are you starting it from the "Run" dialog?
I found out that Windows XP has both COMMAND.COM (the old DOS shell) as well as CMD.EXE (the interpreter originally invented for NT).
I can't find any kind of line length limitation for CMD.EXE, so I'm not sure that's it. I'd also be interested to know if any lines which are longer (and contain spaces in the file names) in the batch file are executing successfully.
Any chance you could post a screen shot of the command window showing the error?
Quote - pjz99 ... the destinations are files.
Yes, I caught that, I'm saying my version of xcopy does not behave the same as yours (either I get prompted in that way, or it succeeds in copying). I don't know what to tell you as to why yours is not working the same unless maybe you've installed a replacement xcopy, I know for sure mine is the Microsoft vanilla version.
If I remember correctly, "command.com" is provided only for 16-bit compatibility, and for any modern stuff you really ought to be using cmd.exe as your basic command interpreter.
Did this ever work in the past? Has it stopped working recently? What changed? Are you able to just use the copy command instead of xcopy?
If the command line length is the problem, the 'subst' command still works in XP, and may be useful, depending on your directory layout. You can run it from a shell, or put it in autoexec.bat....
----------------------------------------------------------------------------------------
The Wisdom of bagginsbill:
"Oh - the manual says that? I have never read the manual - this must be why."If copy AND xcopy are both giving you problems, I don't really know what to tell you other than to maybe look into some freeware alternative batch copying utility (or buy one if you care to spend money on it). What exactly was the problem with the plain copy command?
I don't have any opinion myself, it's been many years now since I had occasion to use tools like that and I don't even remember names for the stuff any more :huh: Hopefully Kaibach gets you squared away.
All,
Problem solved. Here is an example of the correct format :
XCOPY /Y "F:Poser Runtime/Textures/RMKyonRMKI2.jpg" "C:Program Files/e frontier/Other Runtimes/Miki/runtime/Textures/RMKyon/"
I found out that XCOPY needs to know whether you are copying the file to another file or to a directory. To avoid any such ambiguity, you simply place the / character at the end of the destination's directory path, and leave out the destination file name.
The quotes are to cater for spaces that are embedded in the directory path. The /Y switch is to suppress any confirmation prompts - which is good news for batch files.
Thanks one and all for your help.
regards,
Andrew
Ah, that brought back memories, though not useful ones. My batch code skills are pining for the fjords.
I have a DOS version of the awk utility somewhere, which I used to use for processing the lists of newsgroup names I got from my ISP's news server. Also a version of the gsort utility. But it's been quite a few years since I did anything complicated.
These days, people recommend Perl, and I recoil in horror. I shall have to look into Python: there are standalone versions as well as Poser's internal interpreter.
Quote -
These days, people recommend Perl, and I recoil in horror. I shall have to look into Python: there are standalone versions as well as Poser's internal interpreter.
I've looked into Python and liked it. They have so much stuff included, basic stuff seems to be quite easy. Give it a try, it works pretty well for me.
A ship in port is safe;
but that is not what ships are built for.
Sail out to sea and do new things.
-"Amazing
Grace" Hopper
Avatar image of me done by Chidori.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
All,
I am trying to run the following from the command prompt :
XCOPY /C "F:Poser Runtimetextures!DREAMSQUARESDreamyRealisticEyesDRE_Bl
ack.jpg" "C:Program Filese frontierOther RuntimesMikiruntimetextures!DREA
MSQUARESDreamyRealisticEyesDRE_Black.jpg"
(sorry about the wrap-around).
When I run this, I get the error message "Invalid number of parameters".
Any ideas ?
thanks,
Andrew