Yes, it does also work for CD since it's same drive, I've just gotten in the habit of PUSHDing & POPDing in my batch files. If you need it to work for a drive other than current you'd have to change it a bit at which point I'd say "PUSHD drive:path" more straight forward than "CD /D drive:path" since it also allows simple backing out to last directory & drive without having to track manually with environment variables.
There is also a method I've seen DriverPacks use to locate the CDROM drive based on a "IF EXIST" check for a file on a certain path & extracting the CDROM drive letter. Even in a crowded list of sub-folders you could find a target folder if there's a known unique filename using the same method. This is the kind of "programing" I love, simple & powerful. CLI scripting was one of things I liked the best about taking a Unix class. Thane Sherrington wrote: > At 04:17 PM 23/08/2007, j maccraw wrote: >> With only one folder, easily enough done under XP: >> >> for /d %f in (*) do pushd %f > > Brilliant! Thanks. > > This also appears to work as for /d %f in (*) do cd %f > > T > > ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/