Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

cdd - is this a bug or a feature?

Dec
47
2
TCC latest version. I came across this when I noticed that a batch file wasn't working properly.


E:\Download >

E:\Download > cdd G:

E:\Download > current directory doesn't change

E:\Download > cdd G:\

G:\ > current directory changes
 
I think it acts like CD in that respect. With just a drive specification (no trailing '\') it reports the current directory on the specified drive.
Code:
v:\cksum> cdd v:
V:\cksum

v:\cksum> cdd g:
G:\tc22

v:\cksum> g:

g:\tc22> v:

v:\cksum>
 
The only thing it "reports" is "G:\"
That would mean that the current directory on the G: drive is the root directory. To see otherwise ...
Code:
( c:\ ) > cdd g:\subdirectory
( g:\subdirectory ) > cdd c:\
( c:\ ) > cdd g:
[code]

That should tell you that the current directory on the g: drive is g:\subdirectory.
 
I think it acts like CD in that respect. With just a drive specification (no trailing '\') it reports the current directory on the specified drive.

I guess my assumption was that cdd G: would result in changing the current drive to G: since cdd is supposed to mean change drive and directory.

Apparently that is not the case and I have to use cdd G:\

Not a big deal, it just seemed weird.
 
The help backs that up.

"If no drive / path argument is supplied, CDD displays the current drive and directory. "

And for the path argument:

"The name of the directory (or drive and directory) to change to."

So a path argument is definitely required no matter what for a change to it to happen, I suspect avoiding any guesswork on what the drive's current directory is.
 
I am just curious to know if there is a specific reason for which You do not use the "command" "G:" that goes to the current directory of G drive?

Regards

Rodolfo Giovanninetti
 

Similar threads

Back
Top