I've accidentally found that if I do:
I get a list of files that are direct children of the C: drive, in the root.
However, if I do:
I get a huge list of files that I'm not even sure where they are (DLLs, EXEs, CPLs, etc.).
Do you know why does this happen and where does this list come from?
Braiam
4,11233 gold badges1919 silver badges5252 bronze badges
Cai Cach Ruong Dat
NunoNuno
5 Answers
Specifying
DIR location will show you the contents of the location.
Specifying
C: on many commands, including the DIR command, refers to the C drive, and refers to the current directory. To see your current directory, type this:
All National Axe Throwing Federation targets require at least one sub-frame layer. The target surface is comprised of three 2x10 boards cut to 4 foot. These outer edge boards serve to hold the existing target in place upon axe impact. How to Build an End Grain Knife Throwing Target. By April Wilkerson on January 22, 2017. If you follow me on Instagram you're probably aware that I enjoy. Diy axe throwing wall. Keep in mind that competitive Axe throwing targets require special dimensions – so we will try. The other 2x4s will also be cut in half, but with 45º on the ends.
The
cd command is typically used to change which directory is current. However, in MS-DOS (and similar operating systems, including modern Microsoft Windows, but not including Unix), running cd by itself will show you the current directory.
In all probability, if you haven't been using the
cd command, then your current directory is probably the directory that your operating system was installed to. (At least, that's a common behavior for Microsoft Windows systems.)
You can do this:
That will show you the contents of
C:Program Files
Similarly, you can do something like:
copy C:*.* and all contents from the current directory will be copied.
When you specify
C: , then the backslash indicates the 'root' directory, also known as the 'top level' directory. That might, or might not, be the same thing as your current directory.
If you just specify DavidPostill♦
DIR , then the current drive will be assumed. (You can type something like C: or D: , as an entire command (on a line by itself), to change which drive is considered to be the 'current drive'.) If you just specify DIR , then the current drive and the current directory will be assumed.
111k2727 gold badges247247 silver badges281281 bronze badges
TOOGAMTOOGAM
11.6k33 gold badges2626 silver badges4747 bronze badges
TL;DR -
dir C: will list the current directory on C: whatever that happens to be, as opposed to dir C: which will always list the root of C: .
Long story.. At the command line prompt,
cmd remembers the current directory for each drive it accessed during the session.
The current directory on a drive
X: other than the current one can be set with cd X:etc (without the /d switch which would also change the current drive to X: ), and is returned by cd X: (without a ) - both noted in the cd /? help:
Type CD drive: to display the current directory in the specified drive.
Use the /D switch to change current drive in addition to changing current directory for a drive.
See Why does each drive have its own current directory? for background, including this quote.
Remembering the current directory for each drive has been preserved ever since [n.b. DOS], at least for batch files, although there isn’t actually such a concept as a per-drive current directory in Win32. In Win32, all you have is a current directory. The appearance that each drive has its own current directory is a fake-out by cmd.exe, which uses strange environment variables to create the illusion to batch files that each drive has its own current directory.
The
strange environment variables referred to in the linked post What are these strange =C: environment variables? can be seen with set ' at the cmd prompt, for example:
dxivdxiv
The reason you are getting two different directories is simple. The
is the difference.
dir C: is asking for the directory listing of the C drive at its . is the root folder.
dir C: is asking for the directory listing of where you are (or was last, if you changed drives)
If you're on the KeltariKeltari
C drive and just type dir and hit enter , you will get the same contents of dir C: . If you're on a different drive, and type C: to change back to the C drive, then you'll end up in the directory that you saw when you typed dir C: .
53.2k1919 gold badges124124 silver badges172172 bronze badges
As this is not StackOverflow, this should only be a comment, at best, but it doesn't fit:.
The .NET Framework (perhaps via Win32) does reflect the current directory for the current drive:
Mark HurdMark Hurd
32911 gold badge55 silver badges1515 bronze badges
You are running two commands together.
c: is itself a command for changing to the PREVIOUS LOCATION on the C: drive. So it would hold the location before you changed drives using d: or e: . dir is a command used to list the contents of a directory.
So basically you are listing content of your previous folder on the C: drive even though you are on another drive.
Seth
6,80211 gold badge1111 silver badges2929 bronze badges
kaushikCkaushikC
Not the answer you're looking for? Browse other questions tagged windowscommand-lineshellcmd.exe or ask your own question.
SharePort Mobile lets you access and play media stored on any USB drive directly on your mobile device! Just plug your USB storage drive into any SharePort Mobile-enabled D-Link router, and access your files from any device connected to your router. Share photos and videos with friends without resizing or bothering with e-mail. Now you can create a shared storage space for your home or office. You can even share files with an audience when giving a business presentation. SharePort Mobile lets you: * Stream movies and music to your Android device * Play slideshows of your photos * View documents directly on your mobile device * Save files for offline playback by using the Favorites feature * Upload photos and videos from your Camera Roll to your USB storage drive To view the list of supported routers, please go to http://www.dlink.com/shareportmobileapp SharePort Mobile is compatible with the following models: *DIR-505 *DIR-505L *DIR-506L *DIR-508L *DIR-626L *DIR-636L *DIR-820L *DIR-826L *DIR-836L *DIR-845L *DIR-850L *DIR-855L *DIR-860L *DIR-865L *DIR-868L * More coming soon!
D-Link routers almost never require a default password and usually use the default IP address of 192.168.0.1 but there are exceptions, as you can see in the table.
Don't forget to configure a router password once you've gotten in.
See below the table for more help if the default data below doesn't work, you don't see your D-Link device, or you have other questions.
D-Link Default Password List (Valid June 2019)
[1] The D-Link DI-634M router has two default access accounts, an administrator-level account (username of admin) that you should use for router management as well a user-level account (username of user) that can be used to viewing data but not making changes.
[2] D-Link DI-701 routers have an administrator-level default account (no username or password required), as well as another administrator-level account for ISPs called Super Admin (no username with a password of year2000) that grants the additional ability to set a user limit via the usrlimit command, available in the router's terminal mode.
[3] These D-Link routers, the DSA-3100 & the DS-5100, have default administrator accounts (admin / admin) as well as default 'manager' accounts (manager / manager) which are restricted to adding and managing additional user access accounts.
Can't find your D-Link network device in the table above? Just send me an email with the model number and I'd be happy to look it up, let you know, and add it to the list for everyone else.
When the D-Link Default Password or Username Won't Work
There are no secret back doors to your D-Link router or another network device, meaning that if the default admin password has been changed and you don't know what it is, you're locked out. Period.
The solution, then, is to reset the entire D-Link device to factory settings, resetting the password to its default and erasing any wireless network or other settings.
Best Ways to Reset a Home Network Router
Performing a factory reset on a D-Link router is pretty easy. Turn on the device, press and hold the Reset button (usually on the back of the device) with a paper clip or small pen for 10 seconds and then release it. Wait a few more minutes for the router to finish booting.
If the factory default reset doesn't work, or you can't find that reset button, check your device's manual for specific instructions. A PDF version of your device's manual can be found at D-Link Support.
Once you've reset the D-Link admin password, it's important to change it to something secure that can't be easily guessed like the default D-Link password. Once you do that, consider storing the new password in a password manager to avoid having to reset it again in the future.
When the D-Link Default IP Address Won't Work
Assuming that your D-Link router is powered on and connected to your network, but the default IP address listed above isn't working, try opening a web browser window and connecting to http://dlinkrouter.local.
If that doesn't work, try http://dlinkrouterWXYZ, with WXYZ being the last four characters of the device's MAC address.
All D-Link devices have their MAC addresses printed on a sticker that's located on the bottom of the device. So, for example, if your D-Link router's MAC address is 13-C8-34-35-BA-30, you'd go to http://dlinkrouterBA30 to access your router.
If that trick doesn't work, and your D-Link router has been connected to a computer, the configured default gateway will almost always equal the access IP address for your router.
See our how to find the default gateway IP address tutorial for instructions on where to look for the default gateway IP, which is buried deep within your computer's network settings. Red alert 2 red revolution.
If you need more help accessing or troubleshooting your D-Link router, or have questions in general about default passwords and other default network data, see our default password FAQ.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |