was unexpected at this time

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
SCylant
Posts: 2
Joined: 28 Jul 2015 06:47

was unexpected at this time

#1 Post by SCylant » 28 Jul 2015 09:24

Neither works..
for /f "tokens=1,2,3 delims=\ " %%a in ("aaa\bbb\ccc") do set sha=%%a&set shb=%%b&set shc=%%c
for /f "tokens=1,2 delims=\ " %%a in ("aaa\bbb\ccc") do set sha=%%a&set shb=%%b&set shc=%%c

%%a was unexpected at this time.
DOS 5.00.500

Thanks

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: was unexpected at this time

#2 Post by foxidrive » 28 Jul 2015 09:38

Your question is unclear.

Are you using MSDOS V5?

SCylant
Posts: 2
Joined: 28 Jul 2015 06:47

Re: was unexpected at this time

#3 Post by SCylant » 28 Jul 2015 11:47

Yes according to command /k ver, win 7 32, it came with the corporate pc, should still work though, according to help for, or not, I am not sure.
I took the syntax from DOSTips string manipulation samples online. I am passing those lines directly from the command line.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: was unexpected at this time

#4 Post by foxidrive » 28 Jul 2015 13:19

MSDOS doesn't have the enhanced FOR commands of the NT series of Windows.

Post Reply