Invalid parameter to SHIFT command

Convert your BATch files into EXEcutable format in one click.
Post Reply
chribonn
Posts: 9
Joined: Tue Feb 06, 2007 4:37 pm

Invalid parameter to SHIFT command

Post by chribonn » Sat Mar 03, 2007 2:04 pm

Hi,

I am trying to run a compiled batch file (containing included files) under Windows 2003 Server. The first line after the command is the error above.

Is this related to QBC?

Thanks,
Al

chribonn
Posts: 9
Joined: Tue Feb 06, 2007 4:37 pm

It seems to be QBC

Post by chribonn » Sat Mar 03, 2007 2:25 pm

I ran the same command file both as EXE and as CMD and it seems that the problem is QBC. Below are the two scripts:

Code: Select all

C:\Program Files\TestBk>TestBackup.exe "D:\Directory" 12345M
Invalid parameter to SHIFT command
C:\Program Files\TestBk>TITLE Test Backup
C:\Program Files\TestBk>SETLOCAL
C:\Program Files\TestBk>IF NOT Windows_NT == Windows_NT GOTO :EOF
C:\Program Files\TestBk>SET rm_Version=1.1.3.0
C:\Program Files\TestBk>REM Set HOMEPATH values
C:\Program Files\TestBk>SET HOMEDRIVE=C:
C:\Program Files\TestBk>SET HOMEPATH=Program Files\TestBk
C:\Program Files\TestBk>REM Backup Directory
C:\Program Files\TestBk>IF [TestBackup.exe] == [] GOTO Help
--------------------

Code: Select all

C:\Program Files\TestBk>TestBackup.cmd "D:\Directory" 12345M
C:\Program Files\TestBk>TITLE Test Backup
C:\Program Files\TestBk>SETLOCAL
C:\Program Files\TestBk>IF NOT Windows_NT == Windows_NT GOTO :EOF
C:\Program Files\TestBk>SET rm_Version=1.1.3.0
C:\Program Files\TestBk>REM Set HOMEPATH values
C:\Program Files\TestBk>SET HOMEDRIVE=C:
C:\Program Files\TestBk>SET HOMEPATH=Program Files\TestBk
C:\Program Files\TestBk>REM Backup Directory
C:\Program Files\TestBk>IF ["D:\Directory"] == [] GOTO Help
If you look at the list line of each script you will notice that it has shifted.

Any help at solving this problem would be greatly appreciated.

Regards,
Al

chribonn
Posts: 9
Joined: Tue Feb 06, 2007 4:37 pm

The Problem

Post by chribonn » Sat Mar 03, 2007 4:00 pm

I'm still trying to shed light on the problem and create a way to reproduce the error.

I created this simple CMD file which I compiled using QBC.

ECHO %0
ECHO %1
ECHO %2
ECHO %3

Runing it under Windows XP returns

D:\Temp>test 12345
D:\Temp>ECHO test
test
D:\Temp>ECHO 12345
12345
D:\Temp>ECHO
ECHO is on.
D:\Temp>ECHO
ECHO is on.

while running it under Windows 2003 gives

C:\Temp>test.exe 12345
Invalid parameter to SHIFT command
C:\Temp>ECHO C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\bt3037.bat
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\bt3037.bat
C:\Temp>ECHO test.exe
test.exe
C:\Temp>ECHO 12345
12345
C:\Temp>ECHO
ECHO is on.
C:\Temp>

Hope this helps.

DJX
Posts: 12
Joined: Thu Jan 04, 2007 11:19 pm
Location: Cleveland, Ohio

Post by DJX » Tue Mar 06, 2007 2:30 pm

I already started a post about this:

http://www.abyssmedia.com/forum/windows ... t-t66.html

It's a compiler issue but it still happens even when I compile it under Win2K3.

chribonn
Posts: 9
Joined: Tue Feb 06, 2007 4:37 pm

Post by chribonn » Tue Mar 06, 2007 2:34 pm

It also applies to QBFC 2.1.6.0.

The posting incorrectly states that your program works fine. This should be changed to "it works fine as long as you do not use parameters".

Regards,
Al

support
Site Admin
Posts: 396
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Wed Jul 18, 2007 3:38 pm

Already fixed in v2.5

MaciekB
Posts: 1
Joined: Tue Aug 07, 2007 12:10 pm

Post by MaciekB » Tue Aug 07, 2007 12:14 pm

support wrote:Already fixed in v2.5
Where can I download this version ?
I really need new version without "Invalid parameter to SHIFT command"
error.

support
Site Admin
Posts: 396
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Wed Aug 08, 2007 11:16 am

MaciekB wrote:
support wrote:Already fixed in v2.5
Where can I download this version ?
I really need new version without "Invalid parameter to SHIFT command"
error.
Please check PM.

OmegaZero
Posts: 1
Joined: Thu Aug 09, 2007 9:01 pm

Post by OmegaZero » Thu Aug 09, 2007 9:03 pm

I also need the new version to fix this error. I have sent an email to support also - no response yet...

EDIT: Oddly enough, I received a reply while I was posting this. Thanks! :D

Post Reply