Prev: Explorer: Address Violation at address xxxxxxxx Read of address xx
Next: IE Error when opening .ZIP files
From: Robert Riebisch on 25 Oct 2006 08:22 Andy schrieb: > ----------------------- START MESSAGE ---------------------- > C:\>cmd /k;mode con lines=50 cols=100 ; C:\Contig.exe -A > "D: \user data\@My Downloads\*.*" > Invalid parameter - ; > ----------------------- END MESSAGE ------------------------ > > When I remove some spaces in the batch file commands I then get other > errors. I keep getting different errors. What's your problem to understand "Invalid parameter - ;"?! Why do you think ";" is a valid character to concat multiple commands? That's for 'bash', but not for 'cmd.exe'. Try "&&" instead. -- Robert Riebisch Bitte NUR in der Newsgroup antworten! Please reply to the Newsgroup ONLY!
From: Pegasus (MVP) on 25 Oct 2006 09:08 "Andy" <nomail(a)nomail.com> wrote in message news:Xns98677EE21AB0374C1H4(a)127.0.0.1... > > "Andy" <nomail(a)nomail.com> wrote in message > >> > >> ISTR there is a way to change the line length in XP's "DOS box" > >> (or more correctly the line command interface in XP got from > >> running "CMD". > >> > >> How do I change the line length and/or get lines to wrap? > >> > > > On 24 Oct 2006, Pegasus (MVP) <I.can(a)fly.com> wrote: > > > > mode con lines=50 cols=100 > > > > > > That works well when I key it to an open command line box but it fails > when I use it in a batch command. > MODE CON LINES=50 COLS=100 > > Here is the full batch file text (which has no line breaks in the > version I am testing): > > --------------------- START TEST COMMAND ------------------------- > > cmd /k;mode con lines=50 cols=100 ; C:\Contig.exe -A > "D:\user data\@My Docs - XP\@My Opera downloads\*.*" > > where: > > (1) cmd /k; > = OPEN LINE COMMAND BOX AND KEEP OPEN > > (2) mode con lines=50 cols=100 ; > = COMMAND FROM PREVIOUS POSTING > > (3) C:\Contig.exe > = COMMAND FROM "SYSTEM INTERNALS" UTILITY > http://www.sysinternals.com/Utilities/Contig.html > > (4) -A > = PARAMETER FOR CONTIG.EXE > > (5) "D:\user data\@My Docs - XP\@My Opera downloads\*.*" > = TARGET FILES > --------------------- END TEST COMMAND ------------------------- > > When i run that batch file I get the following message as if there is a > problem with the separators and special characters I am using in my long > file name: > > ----------------------- START MESSAGE ---------------------- > C:\>cmd /k;mode con lines=50 cols=100 ; C:\Contig.exe -A > "D: \user data\@My Downloads\*.*" > Invalid parameter - ; > ----------------------- END MESSAGE ------------------------ > > When I remove some spaces in the batch file commands I then get other > errors. I keep getting different errors. > > Can anyone get this to work? (It works well if |I do not use the MODE > CON command!) > > Thank you. > Andy It seems you're trying to run before you can walk. Try this for starters: mode con lines=50 cols=100 Get rid of the semicolons. If you must concatenate commands, use a single ampersand (not a double ampersand, as some respondent suggests). Depending on the environment you're in, you may have to escape it: ^&.
From: Andy on 27 Oct 2006 13:22 On 25 Oct 2006, Robert Riebisch <Robert.Riebisch(a)arcor.de> wrote: > Andy schrieb: > >> ----------------------- START MESSAGE ---------------------- >> C:\>cmd /k;mode con lines=50 cols=100 ; C:\Contig.exe -A >> "D: \user data\@My Downloads\*.*" >> Invalid parameter - ; >> ----------------------- END MESSAGE ------------------------ >> >> When I remove some spaces in the batch file commands I then get >> other errors. I keep getting different errors. > > What's your problem to understand "Invalid parameter - ;"?! No, I understand "invalid parameter" perfectly well. The problem I have is to determine why that message was made to appear and how to code thelines such that it does not appear. > > Why do you think ";" is a valid character to concat multiple > commands? That's for 'bash', but not for 'cmd.exe'. Try "&&" > instead. > The semi-colon seems to work after "cmd /k" followed by a simple command. Why is semi-colon working in that sort of arrangement?
From: Andy on 28 Oct 2006 05:12 > "Andy" <nomail(a)nomail.com> wrote in message > >> > "Andy" <nomail(a)nomail.com> wrote in message >> >> >> >> ISTR there is a way to change the line length in XP's "DOS >> >> box" (or more correctly the line command interface in XP got >> >> from running "CMD". >> >> >> >> How do I change the line length and/or get lines to wrap? >> >> >> >> >> On 24 Oct 2006, Pegasus (MVP) <I.can(a)fly.com> wrote: >> > >> > mode con lines=50 cols=100 >> > >> >> >> >> That works well when I key it to an open command line box but it >> fails when I use it in a batch command. >> MODE CON LINES=50 COLS=100 >> >> Here is the full batch file text (which has no line breaks in the >> version I am testing): >> >> --------------------- START TEST COMMAND ------------------------- >> >> cmd /k;mode con lines=50 cols=100 ; C:\Contig.exe -A >> "D:\user data\@My Docs - XP\@My Opera downloads\*.*" >> >> where: >> >> (1) cmd /k; >> = OPEN LINE COMMAND BOX AND KEEP OPEN >> >> (2) mode con lines=50 cols=100 ; >> = COMMAND FROM PREVIOUS POSTING >> >> (3) C:\Contig.exe >> = COMMAND FROM "SYSTEM INTERNALS" UTILITY >> http://www.sysinternals.com/Utilities/Contig.html >> >> (4) -A >> = PARAMETER FOR CONTIG.EXE >> >> (5) "D:\user data\@My Docs - XP\@My Opera downloads\*.*" >> = TARGET FILES >> --------------------- END TEST COMMAND ------------------------- >> >> When i run that batch file I get the following message as if there >> is a problem with the separators and special characters I am using >> in my long file name: >> >> ----------------------- START MESSAGE ---------------------- >> C:\>cmd /k;mode con lines=50 cols=100 ; C:\Contig.exe -A >> "D: \user data\@My Downloads\*.*" >> Invalid parameter - ; >> ----------------------- END MESSAGE ------------------------ >> >> When I remove some spaces in the batch file commands I then get >> other errors. I keep getting different errors. >> >> Can anyone get this to work? (It works well if |I do not use the >> MODE CON command!) >> >> Thank you. >> Andy On 25 Oct 2006, Pegasus (MVP) <I.can(a)fly.com> wrote: > > > It seems you're trying to run before you can walk. Try this > for starters: > > mode con lines=50 cols=100 > > Get rid of the semicolons. If you must concatenate commands, use > a single ampersand (not a double ampersand, as some respondent > suggests). Depending on the environment you're in, you may have > to escape it: ^&. > > When I replace the first semi-colon (after "/k") with an ampersand (or two ampersands) then the MODE command does not work. And conversely when I restore the semi-colon (after "/k") then the MODE command works again. So it seems that the semi-colon is needed there? --- Whether I use semi-colon or ampersandafter the "/k" command, the CONTIG.EXE command does not work with an anpersand or double ampersands. Should I have line breaks in here somewhere now that ampersand is being used? Do I need to use two sets of double quotes to group the parts of the CONTIG.EXE command together?
From: Robert Riebisch on 30 Oct 2006 07:22 Andy schrieb: > When I replace the first semi-colon (after "/k") with an ampersand (or > two ampersands) then the MODE command does not work. Because you didn't understand. Please read the Windows help about what "cmd /k" does. > And conversely when I restore the semi-colon (after "/k") then the MODE > command works again. It's not. It's probably just ignored by cmd.exe. > So it seems that the semi-colon is needed there? No. > Whether I use semi-colon or ampersandafter the "/k" command, the > CONTIG.EXE command does not work with an anpersand or double ampersands. Then a write a batch file. -- Robert Riebisch Bitte NUR in der Newsgroup antworten! Please reply to the Newsgroup ONLY!
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Explorer: Address Violation at address xxxxxxxx Read of address xx Next: IE Error when opening .ZIP files |