Macro Scheduler 7.4.009 running on WIN98SE, and executing XXcopy Pro.
XXcopy routine is not running from Macro Scheduler on WIN98SE.
When Macro Scheduler runs, the command window flashes too quickly for me to see results. But I think I caught it once and found only 128 characters being accepted on the command line.
My script is running the following line ( total characters is about 197, all on one line):
Run Program>xxcopy.exe \\PGM2\C\*\* D:\Backups\PGM2\ /CR8 /BU /PB /FF /CK0 /WV0 /OAC:\Data\Backups\Logs\20060223Msg.log /FoC:\Data\Backups\Logs\20060223Files.log /FMSDTZAL /ExC:\Data\Backups\Xxcopy\PGM2_ExcludeList.txt
If I open a command window and paste the line above, WIN98 only shows the first 128 chars.
If I open a command window and paste the line above, Xxcopy runs fine on XP-PRO.
If I run Macro Scheduler script on WINXP-PRO, Xxcopy runs fine.
The actual line in the program has 6 predefined %variables% passed in like this:
Run Program>xxcopy %Source% %Destination% %Switches% %MessageLog% %FilesLog% /FMSDTZAL %Exclude%
I know the script is processing the full string becauseI can see the results in the log, and it works OK on WINXP system. I copy/paste from the log into the Command window to test running manually.
Even if I could map a letter to "C:\Data\Backups\", I would still be over the 128 limit. (Mapping is not a preference for logging reasons, need to see absolute real paths).
So, the question is how do I overcome the limit of only 128 characters being accepted on the command line?
Note that spacing on this forum may look incorrect, but the real code is OK.
command line 128 char limit
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
command line 128 char limit
Last edited by Bob Hansen on Fri Feb 24, 2006 8:23 am, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Its been a while since I've had to deal with Win95 and never had a copy of Win98 but It seems like 128 characters was the command line limit. Quick search in Google Groups and there are apparently config.sys settings that can extend the character length limit but I would think that would apply only to DOS windows.
Have you tried running as a DOS process from MS?
Run Program>command /c xxcopy.exe \\PGM2\C\*\* D:\Backups\PGM2\ /CR8 /BU /PB /FF /CK0 /WV0 /OAC:\Data\Backups\Logs\20060223Msg.log /FoC:\Data\Backups\Logs\20060223Files.log /FMSDTZAL /ExC:\Data\Backups\Xxcopy\PGM2_ExcludeList.txt
Another alternative would be to write a batch file, run the batch file then delete the batch file.
Also read that the command line length limit in XP is 8190.
Hope this is helpful,
Dick
Have you tried running as a DOS process from MS?
Run Program>command /c xxcopy.exe \\PGM2\C\*\* D:\Backups\PGM2\ /CR8 /BU /PB /FF /CK0 /WV0 /OAC:\Data\Backups\Logs\20060223Msg.log /FoC:\Data\Backups\Logs\20060223Files.log /FMSDTZAL /ExC:\Data\Backups\Xxcopy\PGM2_ExcludeList.txt
Another alternative would be to write a batch file, run the batch file then delete the batch file.
Also read that the command line length limit in XP is 8190.
Hope this is helpful,
Dick
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Thanks for suggestions, SkunkWorks and Dick.
Current status:
1. Must be run on WIN98SE, so stuck with 128 limit.
2. Running with command.com does not work. I had already tried that.
3. Batch file is a possibility, but would have to make code to create dynamically, since this is run in a loop many times, each time with changing variables.
4. Xxcopy does allow a text file to be used with switch /CF:Filename.xcf, similar to a batch file, one line per parameter. But like batch file, would have to create dynamic versions, would like to avoid that work.
5. It looks like XXcopy does have an undocumented switch /ze0 that calls an environment variable that accepts most switches except Source and Destination, so I think I will try this:May not be able to test this for a few days.
But, even if the /ze0 switch works for this particular script, is it possible for Macro Scheduler to format command lines longer than 128 characters for the WIN9x class of systems? Still have many of them out there to support.
Could this be considered for future enhancement?
I think I found info on Microsoft pages that indicated the last bits of the "command" command could be altered to allow a larger length?
Again, thanks for listening and for the suggestions and help.
Current status:
1. Must be run on WIN98SE, so stuck with 128 limit.
2. Running with command.com does not work. I had already tried that.
3. Batch file is a possibility, but would have to make code to create dynamically, since this is run in a loop many times, each time with changing variables.
4. Xxcopy does allow a text file to be used with switch /CF:Filename.xcf, similar to a batch file, one line per parameter. But like batch file, would have to create dynamic versions, would like to avoid that work.
5. It looks like XXcopy does have an undocumented switch /ze0 that calls an environment variable that accepts most switches except Source and Destination, so I think I will try this:
Code: Select all
SetEnvVar>xxcopy,%Switches% %MessageLog% %FilesLog% /FMSDTZAL %Exclude%
Run Program>xxcopy %Source% %Destination% /ze0
//Clear environment variable xxcopy
SetEnvVar>xxcopy,
But, even if the /ze0 switch works for this particular script, is it possible for Macro Scheduler to format command lines longer than 128 characters for the WIN9x class of systems? Still have many of them out there to support.
Could this be considered for future enhancement?
I think I found info on Microsoft pages that indicated the last bits of the "command" command could be altered to allow a larger length?
Again, thanks for listening and for the suggestions and help.
Last edited by Bob Hansen on Fri Feb 24, 2006 8:25 am, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Command-Line Filenames Appear Limited to 127 Characters
http://support.microsoft.com/kb/121059/en-us
http://support.microsoft.com/kb/121059/en-us
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Thanks Marcus... sounds like the best solution.
From the referenced link:
Thanks again Marcus, I can even implement this one over the phone in three minutes or less.
From the referenced link:
I did some digging first but this link escaped my searches. This will be the easiest solution, and requires no changes to Macro Scheduler either.RESOLUTION
The global command-line character limitation can be increased to its maximum by placing the following line in the CONFIG.SYS file:
shell=c:\windows\command.com /u:250 /p
This command affects all MS-DOS virtual machines (VMs) as well as the Windows 95 command line.
NOTE: If the SHELL command is already present with the /u switch, increase the value to 250.
Thanks again Marcus, I can even implement this one over the phone in three minutes or less.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Problem Solved!
Thank you Marcus.
I added the single line to config.sys and the string passed from Macro Scheduler to the command window was accepted, all ran well.
I will be sending this solution over to the forum for XXcopy also.
Will probably add to all existing WIN9X systems at next maintenance calls.

Thank you Marcus.
I added the single line to config.sys and the string passed from Macro Scheduler to the command window was accepted, all ran well.
I will be sending this solution over to the forum for XXcopy also.
Will probably add to all existing WIN9X systems at next maintenance calls.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!