![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread[>>]
Number : 4756 Date : 2003-06-04 Author : Kan Yabumoto Subject : Re: xxcopy to CD-RW Size(KB) : 1
Garry wrote: As I suspected for a long time, you know 10 x more about the exotic batch techniques than I do. I haven't really followed up the evolution of the batch language since DOS 6.2. Especially, the CMD.EXE generation of the batch "language" goes a lot of mileage. But, any time I find a batch file that has a loop and many if statements, I just lose patience to deal with it. The help text with "call /?" was even new to me. While the %~xxx macros are a good extension, I just wonder if they ever came up with a cleaner version to make the errorlevel test less awkward. That is, the following mess should be cleaned up with something more straightforward. if errorlevel 10 if not errorlevel 11 ... to something like if erroris 10 ... Anyway, I'm sure these things must have been discussed thousands of times in your home turf, alt.msdos.batch.nt ---------------------------- Anyway, here's a list of what I learned from you: 1. The hidden command.com feature, that c:\abcde\ is equivalent to c: 2. cd /d 3. the extended syntax in cmd.exe, %~xxx 4. also, the effect of cd %0\.. That's a lot. As to the final version, the following is my final version which will be included in our future releases of the XXCOPY package. ---------------------------------------------------- if "%OS%"=="Windows_NT" ((cd /d %~dp0)&(goto next)) echo %0 | find.exe ":" >nul if not errorlevel 1 %0\ cd %0\.. :next ---------------------------------------------------- Thank you for spending a lot of time for your personal tutoring. ----------- Anyone who is eager to learn the amazing world of the batch file, you should hang around the following two newsgroups: alt.msdos.batch (you will find a bunch of old timers) alt.msdos.batch.nt. (more professionals, I guess) Kan Yabumoto
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.