Home / Microsoft / Microsoft DOS / dir command doesn't work on external hard drive?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: dir command doesn't work on external hard drive?  (Read 688 times)
els_qq
Topic Starter
Newbie



Posts: 2


« on: November 12, 2009, 04:37:29 AM »

Hi guys,

I'm new here; looking for some help.
I would like to make an inventory of all the folders and files I have on my external hard drive (G:\), having all the names of the files/folders in a text file will do just fine.
I go to my cmd-screen, and use: "dir g:\/s". It outputs all files and folders in G:\, but doesn't show what files/folders are in the subfolders of g:\.
When I use the dir/s command on my C: of D: drive, it does show all files/folders.

What am I doing wrong?

Thanks a lot!

p.s. if anyone has a better solution for taking inventory of my drive: please share :)
IP logged
billrich
Guest
« Reply #1 on: November 12, 2009, 05:29:06 AM »


C:\>E:

E:\>dir /s  >   eee.txt

E:\>wc -l eee.txt
    7095   eee.txt

E:\>type  eee.txt  |  more
 Volume in drive E is My Book
 Volume Serial Number is 0850-D7C5

 Directory of E:\

07/17/2009  03:56 PM            86,009  Volume in drive E is My Book.txt
05/31/2005  01:53 PM               126 -action=view&current=PD.jpg.url
05/01/2006  09:18 AM         2,307,888 050106 001.jpg
05/01/2006  09:18 AM         2,225,312 050106 002.jpg
05/01/2006  09:18 AM         2,328,975 050106 003.jpg
05/01/2006  09:18 AM         2,215,447 050106 004.jpg
05/02/2006  03:50 PM         2,253,170 050206 001.jpg
09/22/2006  10:54 PM            81,907 050206 002 (Small).jpg
05/02/2006  03:50 PM         2,096,056 050206 002.jpg
05/02/2006  03:50 PM         2,286,977 050206 003.jpg
05/03/2006  01:05 PM         2,199,973 050206.jpg
02/03/2003  01:32 AM            20,443 1.jpg
02/03/2003  01:31 AM            11,601 10.jpg
03/20/2007  07:36 PM    <DIR>          100MSDCF
.
.
.
IP logged
billrich
Guest
« Reply #2 on: November 12, 2009, 05:41:25 AM »

E:\>du
1168    ./$msi31~1/spuninst
10896   ./$msi31~1
1165    ./$msi31~2/spuninst
11054   ./$msi31~2
58946   ./100msdcf
71      ./art
4       ./autoin~1
3       ./backups
9626    ./bin
118     ./ccwin9/addres~1
132     ./ccwin9/calendar
632     ./ccwin9/cardfi~1
915     ./ccwin9
20      ./ch.pps/aplite~1/data
259     ./ch.pps/aplite~1/images
2687    ./ch.pps/aplite~1/slides
3225    ./ch.pps/aplite~1
3352    ./ch.pps/powerp~1
6578    ./ch.pps
7       ./corelo~1
568     ./docume~1/alluse~1/docume~1/mypict~1/sample~1
569     ./docume~1/alluse~1/docume~1/mypict~1
570     ./docume~1/alluse~1/docume~1
571     ./docume~1/alluse~1
244     ./docume~1/billri~1/mydocu~1/author~1/ch.pps/aplite~1/images
245     ./docume~1/billri~1/mydocu~1/author~1/ch.pps/aplite~1
246     ./docume~1/billri~1/mydocu~1/author~1/ch.pps
247     ./docume~1/billri~1/mydocu~1/author~1
56      ./docume~1/billri~1/mydocu~1/bodie_~1
41      ./docume~1/billri~1/mydocu~1/mypict~1/wave
2331    ./docume~1/billri~1/mydocu~1/mypict~1
99      ./docume~1/billri~1/mydocu~1/scrsh_~1
8520    ./docume~1/billri~1/mydocu~1
8521    ./docume~1/billri~1
9093    ./docume~1
245115  ./dvdtemp
116270  ./dvdtemp2
1095    ./elaine
233988  ./flv
445     ./greg
6472    ./hide
1       ./install
5516    ./joanpic/12moca~1
2345    ./joanpic/2003va~1
5630    ./joanpic/2003-0~1
1       ./joanpic/2003-0~2
9338    ./joanpic/2003-0~3
11043   ./joanpic/2003-0~4
1       ./joanpic/2003-1~1
2184    ./joanpic/2003ho~1
4806    ./joanpic/2004-0~1
1       ./joanpic/2004-0~2
4610    ./joanpic/2004-0~3
2407    ./joanpic/2004-0~4
7150    ./joanpic/2004-1~1
7458    ./joanpic/2004-1~2
1       ./joanpic/2005-0~1
128065  ./joanpic/2005-0~2
99106   ./joanpic/2005-0~3
31421   ./joanpic/2005-0~4
1       ./joanpic/2005-10
227410  ./joanpic/2005-1~1
1149    ./joanpic/2006-0~1
1825    ./joanpic/2006-0~2
1       ./joanpic/2006-0~3
1       ./joanpic/2006-0~4
164649  ./joanpic/2007-0~1
209576  ./joanpic/2007-0~2
226699  ./joanpic/2007-0~3
2146    ./joanpic/2007-0~4
1771979 ./joanpic/2008-0~1
31380   ./joanpic/2008-0~2
1       ./joanpic/2008-1~1
31881   ./joanpic/202408~1
72980   ./joanpic/20241a~1
1       ./joanpic/202c0a~1
154105  ./joanpic/202c18~1
74825   ./joanpic/203c18~1
440103  ./joanpic/203c2a~1
4688    ./joanpic/204434~1
6675    ./joanpic/204438~1
39469   ./joanpic/205424~1
104210  ./joanpic/20c31a~1
3967    ./joanpic/20fb08~1
2852    ./joanpic/61204
245184  ./joanpic/adobe/digita~1/2007-0~1
245185  ./joanpic/adobe/digita~1
1       ./joanpic/adobe/outgoi~1
1       ./joanpic/adobe/scanne~1
254175  ./joanpic/adobe
29331   ./joanpic/bill
115273  ./joanpic/birthd~1
333     ./joanpic/brooke
49839   ./joanpic/ca05~1
4214    ./joanpic/candace
22707   ./joanpic/christ~1
43242   ./joanpic/co61e2~1
29301   ./joanpic/co985e~1
65709   ./joanpic/cob5c2~1
50385   ./joanpic/cocea6~1
50385   ./joanpic/coebf1~1
14378   ./joanpic/copy(2~1
62913   ./joanpic/copy(2~2
29301   ./joanpic/copy(2~3
39312   ./joanpic/copy(2~4
72980   ./joanpic/copyof~1
89748   ./joanpic/copyof~2
69513   ./joanpic/copyof~3
21310   ./joanpic/copyof~4
4155    ./joanpic/crysta~1
447038  ./joanpic/crysta~2
62399   ./joanpic/deskvi~1
5595    ./joanpic/dog617
.
.
.
51308   ./xmas06~1
24878530        .

E:\>du --xxx
Usage: du [-arst] [directory ...]

E:\>
« Last Edit: November 12, 2009, 08:21:30 AM by billrich » IP logged
els_qq
Topic Starter
Newbie



Posts: 2


« Reply #3 on: November 12, 2009, 05:58:05 AM »

Hi Bill,

thanks for your reply! When I tried your solution, I got the message "acces denied" over and over again.
So I tried to place an empty .txt in G:, by opening notepad and 'save as', I also got some sort of "acces denied" message.
So I went to my external disk's properties, and changed some settings in the security-tab.
Tried the dir/s command again, and it worked!

You reply indirectly led me to the solution, so thanks a lot!
IP logged
billrich
Guest
« Reply #4 on: November 12, 2009, 06:40:10 AM »

E:\>tree
Folder PATH listing for volume My Book
Volume serial number is 0850-D7C5
E:.
├───100MSDCF
├───Art
├───Auto Ins
├───backups
├───bin
├───CCWin9
│   ├───Address Book
│   ├───Calendar
│   └───Card File
├───CH.pps
│   ├───aP Lite Flash
│   │   ├───Data
│   │   ├───Images
│   │   └───Slides
│   └───PowerPoint
├───Corel on the Web
├───Documents and Settings
│   ├───All Users
│   │   └───Documents
│   │       └───My Pictures
│   │           └───Sample Pictures
│   └───Bill Richardson
│       └───My Documents
│           ├───authorGEN Projects
│           │   └───CH.pps
│           │       └───aP Lite Flash
│           │           └───Images
│           ├───BODIE, California_files
│           ├───My Pictures
│           │   └───Wave
│           └───ScrSH_files
.
.
.
E:\>
« Last Edit: November 12, 2009, 07:58:35 AM by billrich » IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #5 on: November 12, 2009, 06:58:04 AM »

bill, if you want to tell OP to use du or tree to perform inventory, just tell OP to perform the task and he will understand. you don't have to post your whole directory tree which is unimportant and cluttering up the space.
IP logged

billrich
Guest
« Reply #6 on: November 12, 2009, 07:09:10 AM »

Tell OP ( original Poster ) to perform the task and he will understand. We don't have to post the directory tree which is  cluttering up the space.

There is a space problem at Computer Hope Board?  The Hope System Administrator did not mention the space problem?

I shall wait for the System Administrator's note.
IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #7 on: November 12, 2009, 07:31:56 AM »

let me ask you, if your E:\ contains 100000 dirs and subdirectories, are you going to post your whole "tree" or "du results? who is going to care about your directory structures anyway for this case? You just have to introduce "tree" or "du" with a short command line syntax and usage to OP and that's it. The rest he will understand when he try out on the command line.
IP logged

billrich
Guest
« Reply #8 on: November 12, 2009, 08:01:25 AM »

Post your whole "tree" or "du results?  Introduce "tree" or "du" with a short command line syntax and usage to OP and that's it. The rest will be understand when the original person tries out the command on the command line.
/quote]



Is Casper, the Ghost, the new System Administrator for the Computer Hope Board?

p.s.  Just kidding.  I  did cut back on part of the demonstration of du and tree.
Not all of the new users and/or readers have Casper's savvy.
« Last Edit: November 12, 2009, 08:18:15 AM by billrich » IP logged
Salmon Trout
Prodigy



Thanked: 501
Posts: 7,363

Computer: Specs
Experience: Guru
OS: Linux variant

1
« Reply #9 on: November 12, 2009, 01:22:24 PM »

Not all of the new users and/or readers have Casper's savvy.

neither does at least one of the older ones.
IP logged

Helpmeh
Egghead



Thanked: 116
Posts: 3,583

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #10 on: November 13, 2009, 04:22:03 AM »

Hi guys,

I'm new here; looking for some help.
I would like to make an inventory of all the folders and files I have on my external hard drive (G:\), having all the names of the files/folders in a text file will do just fine.
I go to my cmd-screen, and use: "dir g:\/s". It outputs all files and folders in G:\, but doesn't show what files/folders are in the subfolders of g:\.
When I use the dir/s command on my C: of D: drive, it does show all files/folders.

What am I doing wrong?

Thanks a lot!

p.s. if anyone has a better solution for taking inventory of my drive: please share :)

I don't find the other posts in this thread helpful at all (sorry if you are offended. It is my opinion). The issue is, that you used a switch AFTER the path, like in the XCOPY command, when it goes before the path. Here is an example of both:

xcopy a\a\*.* G:\b\b\ /e
dir /s G:\b\b\
« Last Edit: November 13, 2009, 05:12:22 PM by Helpmeh » IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
billrich
Guest
« Reply #11 on: November 13, 2009, 04:32:42 PM »

It is my oppinion).



The spell checker is not working?    oppinion) SP
IP logged
BatchFileBasics
Hopeful



Thanked: 18
Posts: 390


BatchFileBasics
« Reply #12 on: November 13, 2009, 05:13:44 PM »


The spell checker is not working?    oppinion) SP

does that have to do with anything this topic is about?

myabe he ddin't crae about splel chekcnig

and i believe helpmeh has finished this topic. just waiting for response from op
IP logged

When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.
Helpmeh
Egghead



Thanked: 116
Posts: 3,583

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #13 on: November 13, 2009, 05:17:43 PM »

does that have to do with anything this topic is about?

myabe he ddin't crae about splel chekcnig

and i believe helpmeh has finished this topic. just waiting for response from op
Thank you BFB. You hit the nail on the head again.
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
BC_Programmer
Mastermind


Thanked: 682
Posts: 15,624

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #14 on: November 13, 2009, 05:20:32 PM »

it doesn't matter where /s is; "dir C: /s" and dir /s C: give the same results. besides, the OP has already stated that that same command shows the entire directory, including subfolders, for other drives. I'm not sure why it wouldn't work, the very same command works on my external drive that coincidentally happens to be G: as well.
IP logged

Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / dir command doesn't work on external hard drive? « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.154 seconds with 20 queries.