Dir command help? /s attribute keeps seaching full drive?

A

acem77

Here is what I am trying to run.

example
dir d:\Users\tjones\Home\ /s *.jpg

I only want it to find jpegs in tjones home folder and all its sub folders.
When I run the command it will 1st search the above path and all subfolders
then it will continue to search the full D: drive grr.
I do not want it do search the complete drive just the home folder and all
subs.

The only time it works is if the command prompt is in the
d:\Users\tjones\Home\ dir and I run > dir /s *.jpg

Looks like this "D:\Users1\tjones\Home>dir /s *.jpg"

I want the full path in the command to work so I can make a batch file to
scan multiple user folders their subs to create a list of files found.

thanks
 
3

3c273

Try dir /s d:\users\tjones\home\*.jpg
Louis

acem77 said:
Here is what I am trying to run.

example

I only want it to find jpegs in tjones home folder and all its sub folders.
When I run the command it will 1st search the above path and all subfolders
then it will continue to search the full D: drive grr.
I do not want it do search the complete drive just the home folder and all
subs.

The only time it works is if the command prompt is in the
d:\Users\tjones\Home\ dir and I run > dir /s *.jpg

Looks like this "D:\Users1\tjones\Home>dir /s *.jpg"

I want the full path in the command to work so I can make a batch file to
scan multiple user folders their subs to create a list of files found.

thanks
 
J

John Wunderlich

Here is what I am trying to run.

example

I only want it to find jpegs in tjones home folder and all its sub
folders. When I run the command it will 1st search the above path
and all subfolders then it will continue to search the full D:
drive grr. I do not want it do search the complete drive just the
home folder and all subs.

The only time it works is if the command prompt is in the
d:\Users\tjones\Home\ dir and I run > dir /s *.jpg

Looks like this "D:\Users1\tjones\Home>dir /s *.jpg"

I want the full path in the command to work so I can make a batch
file to scan multiple user folders their subs to create a list of
files found.

thanks

Did you try:

dir d:\Users\tjones\Home\*.jpg /s

?
-- John
 
A

acem77

John Wunderlich said:
Did you try:

dir d:\Users\tjones\Home\*.jpg /s

?
-- John

does not work
Try dir /s d:\users\tjones\home\*.jpg

need a space after home\
and then it will scan every dir after the path.

same with this one
dir d:\Users\tjones\Home\*.jpg /s

It does this on server 2k3 and xp
 
J

John Wunderlich

does not work
Try dir /s d:\users\tjones\home\*.jpg

It works fine on my XP without the space after home\
It doesn't seem to matter if /s is at end or after "dir".
need a space after home\
and then it will scan every dir after the path.

That I've verified.


-- John
 
A

acem77

John Wunderlich said:
It works fine on my XP without the space after home\
It doesn't seem to matter if /s is at end or after "dir".


That I've verified.


-- John

Really?
it is searching all sub dirs under your root folder?
on mine a xp system and server 2k3 box it stops at the root dir if no space
is entered.
 
J

John Wunderlich

Really?
it is searching all sub dirs under your root folder?
on mine a xp system and server 2k3 box it stops at the root dir
if no space is entered.

I also tried this on my XP machine at home with same results.
With no space, it only displays files in subdirectories below the
specified one and no more.
-- John
 
A

acem77

John Wunderlich said:
I also tried this on my XP machine at home with same results.
With no space, it only displays files in subdirectories below the
specified one and no more.
-- John

Thanks i did get it woking on my xp pc at home.
ill have to take a closer look at work monday.
The only thing it does not let you do is multiple files types in one command.
 
A

Adam

Is there anyway to make it scan the full C:\ drive and make the results or
whatever come up in a .txt document? I need it for some school work.
 
T

Twayne

Is there anyway to make it scan the full C:\
drive and
make the results or whatever come up in a .txt
document?
I need it for some school work.

Sure. Redirect the DIR output to a file.
dir (path) /s > x:\folder\fname.txt

The > creates a new file each time, and >> creates
first, then appends to the existing file after
that.

This's a bad place to ask for school work help;
you could get some destructive responses since you
apparently don't know better. And thanks for
being honest about it being school work.

See
http://commandwindows.com/command1.htm
for some more details. Go down to the table.

Twayne
 
A

Adam

So like dir C:/ /s > C:\Documents and Settings\Administrator\Desktop\scan.txt
or other way around?
dir C:\Documents and Settings\Administrator\Desktop /s > C:\
 
T

Twayne

So like dir C:/ /s > C:\Documents and
Settings\Administrator\Desktop\scan.txt or other
way
around?
dir C:\Documents and
Settings\Administrator\Desktop /s >
C:\

No.
Dir /s "c:documents and... "
In the Command prompt, type dir /? to see all
possibilities/forms of the commend. Just type
help and it'll display all the available
commands.
 
A

Adam

Sorry but that doesn't help me much, Could you just tell me the proper way to
type the command?
Thanks
-Adam
 
A

Adam

I need to know if theres a way to create a "submit" button that on click goes
to another website?
Thanks,
Adam
 
G

G. Morgan

Adam said:
I need to know if theres a way to create a "submit" button that on click goes
to another website?

Are you asking for someone to do your homework for you again?
 
T

Tim Slattery

Adam said:
I need to know if theres a way to create a "submit" button that on click goes
to another website?

Where clicking "Submit" sends the data is controlled by the "action"
property of the "form" tag.
 
A

Adam

No its not homework ... It's kinda just because i'm making a website where
theres a Disclaimer first and then a Check-box to agree and submit, so
thatthe submit button goes to the main site is all i need.
 
A

Adam

Is there a way to create a vote, like a forum where you write your email and
age or whatever and then it sends automaticly to your email?
Thanks.
-Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top