[<<]Message[>>]    [<<]Author[>>]    [<<]Subject[>>]    [<<]Thread[>>]

Number : 4740 Date : 2003-06-04 Author : Garry Deane Subject : Re: xxcopy to CD-RW Size(KB) : 1
--- In xxcopy@yahoogroups.com, Kan Yabumoto wrote: > Garry, if you are tuning in, let me ask you a > batch file question. The reason for Robert's > problem (aside from the fact he does not read the > README.TXT file) is that currently, the INSTALL.BAT > file expects the "current directory" to be where it > (and other XXCOPY-related files) is stored as you > can see by examining the install.bat file. > > Ideally speaking, when the INSTALL.BAT script is > invoked and if the script can determine where it > is stored and put the current directory to be > in that directory (and hopefully automated it), > it would be better. When I wrote that batch file > the technique was not obvious to me (still do not know > any better way) and I made the batch file with > the requirement that the batch file be executed > after making the directory to be current. > > If anyone know an elegant technique to let the > batch file know where the batch file itself reside > (or, make the directory current), let me know. Kan, I think Robert's problem was that he did not run the install.bat so xxcopy was left in the directory he unzipped it to (uninstalled and not in the path). He's probably got that sorted by now but here's how to CD to the batch file directory (tested on DOS 6.22, W98 & NT/W2k/XP, untested on ME but should be OK). @echo off :: Change to the batch file directory for NT/W2k/XP if "%OS%"=="Windows_NT" ((cd /d %0\..)&(goto :next)) :: Change to the batch file drive for DOS/W9x %0\ :: Change to the batch file directory for DOS/W9x cd %0\.. :next echo The current directory is: cd pause However there's probably no need to even do this. You can specify the path to xxcopy.exe by using: %0\..\xxcopy /install Thereafter, xxcopy.exe can determine where it's running from and find the support files to be copied. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.