2011-07-15, 09:50 PM
johnsonx42 Wrote:YOU NEED THE CD COMMAND! Please put it in.Just a quick note...using 'cd' aka 'chdir' isn't always enough if things are on different drives. You also need to change the current working drive. Example pasted directly from my command prompt...
Code:
C:\Program Files\NPVR>cd d:
D:\
C:\Program Files\NPVR>cd d:\npvr
C:\Program Files\NPVR>cd d:
D:\nPVR
C:\Progras\m FileNPVR>
Obviously my command prompt is currently working in 'C:\Program Files\NPVR' and I execute 'cd d:' - doing this queries the working directory for 'd:' (returning 'D:\') but doesn't change the working directory for my command prompt.
I then execute 'cd d:\npvr' to actually change (rather than query) the working directory for 'd:' and then follow this by executing 'cd d:' again which shows that the working directory for 'd:' has indeed changed to 'D:\nPVR'.
Notice, however, that none of this has changed the current working directory of my command prompt - the prompt still shows 'C:\Progras\m FileNPVR>'. This behaviour applies to a batch file as well so changing the working drive is important in order to cope with relative as opposed to absolute paths.
It can get more complex than this but I won't go into further detail.
Cheers,
Brian