A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

List all *.jpg files in computer



 
 
Thread Tools Display Modes
  #1  
Old February 2nd 16, 04:25 PM posted to microsoft.public.windowsxp.general
GARYWC
external usenet poster
 
Posts: 1
Default List all *.jpg files in computer

The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


(I'm running Windows 7)
Ads
  #2  
Old February 2nd 16, 06:08 PM posted to microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default List all *.jpg files in computer

Gary,

why am I'm getting an ACCESS DENIED message?


Maybe you are, as a standard user, not allowed to write into C:\ (the root
folder) ?

Try this :

echo Test listjpg.txt

If it also returns that error you do not have the rights. In that case
write to your own personal temp-files folder. Like this:

dir /s *.jpg %temp%\listjpg.txt

By the way: also check out the "/b" option:

dir /s /b *.jpg %temp%\listjpg.txt

It outputs the full path of the found file.

Hope that helps.

Regards,
Rudy Wieser


-- Origional message:
GARYWC schreef in berichtnieuws
...
The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


(I'm running Windows 7)



  #3  
Old February 2nd 16, 06:33 PM posted to microsoft.public.windowsxp.general
Paul
external usenet poster
 
Posts: 18,275
Default List all *.jpg files in computer

R.Wieser wrote:
Gary,

why am I'm getting an ACCESS DENIED message?


Maybe you are, as a standard user, not allowed to write into C:\ (the root
folder) ?

Try this :

echo Test listjpg.txt

If it also returns that error you do not have the rights. In that case
write to your own personal temp-files folder. Like this:

dir /s *.jpg %temp%\listjpg.txt

By the way: also check out the "/b" option:

dir /s /b *.jpg %temp%\listjpg.txt

It outputs the full path of the found file.

Hope that helps.

Regards,
Rudy Wieser


There are a couple places for output

dir /s *.jpg %temp%\listjpg.txt
dir /s *.jpg %userprofile%\Downloads\listjpg.txt

And if a person wants to understand those locations,
they can click in the bar at the top of the File Explorer
window and enter

%temp%
%userprofile%

and get the File Explorer to "expand" the variables. That
way, it makes it easier to locate the output later.

And if you look at "shortcut" icons on your system,
you do "Properties" on them and look at their
construction, some use double-quotes to prevent
a space character in the path name from screwing
up. It may not happen in this case, but if the
file ends up in the wrong place, you could
try something like this.

dir /s *.jpg "%userprofile%\Downloads\listjpg.txt"

The most likely place for that to screw up, is if
I write my own C program, and it receives a path
specification, and improperly treats it as two
separate text strings. So if you get a "rotten surprise",
you can try to use the double-quote characters
as an insulation mechanism on a future invocation.
My %userprofile% has a space between my first name
and my last name.

Paul
  #4  
Old February 2nd 16, 06:55 PM posted to microsoft.public.windowsxp.general
Micky
external usenet poster
 
Posts: 1,528
Default List all *.jpg files in computer

[Default] On Tue, 2 Feb 2016 08:25:50 -0800 (PST), in
microsoft.public.windowsxp.general GARYWC
wrote:

The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


Because you're a punk and you don't deserve any access at all.

Well, I tried exactly what you have above in Vista Business and it
took quite a while with nothing happening on the screen, but it did
write a 340K file with 6400 lines, including summary lines every time
the directory changed.

I guess I'm more of a man than you are.


(I'm running Windows 7)

  #5  
Old February 3rd 16, 11:53 AM posted to microsoft.public.windowsxp.general
Kerr Mudd-John
external usenet poster
 
Posts: 87
Default List all *.jpg files in computer

On Tue, 02 Feb 2016 16:25:50 -0000, GARYWC wrote:

The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


(I'm running Windows 7)


you don't have read access to some subfolders, or (more likely) you don't
have write access to the current folder.


--
Bah, and indeed, Humbug
  #6  
Old February 3rd 16, 04:43 PM posted to microsoft.public.windowsxp.general
No_Name
external usenet poster
 
Posts: 627
Default List all *.jpg files in computer

On Wed, 03 Feb 2016 11:53:04 -0000, "Kerr Mudd-John"
wrote:

On Tue, 02 Feb 2016 16:25:50 -0000, GARYWC wrote:

The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


(I'm running Windows 7)


you don't have read access to some subfolders, or (more likely) you don't
have write access to the current folder.


You can break that tie by trying it without piping the results to a
file. See if you can just list them.
On my old XP machine you also may have to go into tools/folder options
and uncheck "hide system files" and check "show hidden files"

This does point out the advantage of only keeping programs and system
files in the C: partition and putting your "data" on D: or some other
drive.
  #7  
Old February 4th 16, 08:48 AM posted to microsoft.public.windowsxp.general
mike[_10_]
external usenet poster
 
Posts: 1,073
Default List all *.jpg files in computer

On 2/3/2016 3:53 AM, Kerr Mudd-John wrote:
On Tue, 02 Feb 2016 16:25:50 -0000, GARYWC wrote:

The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


(I'm running Windows 7)


you don't have read access to some subfolders, or (more likely) you
don't have write access to the current folder.


home or pro?
Are you an administrator?
Did you open the command prompt with "run as administrator"?

Remove the redirect and write to the display.
That will tell you if it's a read or write issue.
If the display is correct, change the redirect to a place
to which you do have write permission.

I can't test the read issue for you because I take
ownership of the whole damn drive on my systems.
Your command works fine on mine.
  #8  
Old February 4th 16, 09:09 AM posted to microsoft.public.windowsxp.general
Paul
external usenet poster
 
Posts: 18,275
Default List all *.jpg files in computer

mike wrote:
On 2/3/2016 3:53 AM, Kerr Mudd-John wrote:
On Tue, 02 Feb 2016 16:25:50 -0000, GARYWC
wrote:

The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


(I'm running Windows 7)


you don't have read access to some subfolders, or (more likely) you
don't have write access to the current folder.


home or pro?
Are you an administrator?
Did you open the command prompt with "run as administrator"?

Remove the redirect and write to the display.
That will tell you if it's a read or write issue.
If the display is correct, change the redirect to a place
to which you do have write permission.

I can't test the read issue for you because I take
ownership of the whole damn drive on my systems.
Your command works fine on mine.


Did you actually do that on C: ?

I'm interested.

Does Windows Update still work ?

Can you install a program in Program Files as normal ?

Paul
  #9  
Old February 4th 16, 01:54 PM posted to microsoft.public.windowsxp.general
mike[_10_]
external usenet poster
 
Posts: 1,073
Default List all *.jpg files in computer

On 2/4/2016 1:09 AM, Paul wrote:
mike wrote:
On 2/3/2016 3:53 AM, Kerr Mudd-John wrote:
On Tue, 02 Feb 2016 16:25:50 -0000, GARYWC
wrote:

The Windows Command Prompt, shows:

C:\

when I type:

dir /s *.jpg listjpg.txt

why am I'm getting an ACCESS DENIED message?


(I'm running Windows 7)

you don't have read access to some subfolders, or (more likely) you
don't have write access to the current folder.


home or pro?
Are you an administrator?
Did you open the command prompt with "run as administrator"?

Remove the redirect and write to the display.
That will tell you if it's a read or write issue.
If the display is correct, change the redirect to a place
to which you do have write permission.

I can't test the read issue for you because I take
ownership of the whole damn drive on my systems.
Your command works fine on mine.


Did you actually do that on C: ?



I'm interested.


If I look at permissions for c:, all the checkboxes
in effective permissions are checked. The drive is still
owned by trustedinstaller. I think I actually
took ownership in only those places where it wouldn't let me
change permissions.

On this system, I am the owner of Program Files.
I didn't change anything that
should reduce the ability of the system to do its thing. Seems to work.

Does Windows Update still work ?

Windows update has been disabled since day one via the
standard MS GUI interface.

Can you install a program in Program Files as normal ?

Most installers put programs in Program Files. Problem I had
was that sometimes you needed to put additional .dlls in
the program directory to enable additional functionality.
Taking ownership (and permissions) allowed that.
When it comes to forcing
the OS out of my way, I tend to use the chainsaw rather
than the scalpel.

That's one of my pet peeves with linux. It's always asking me
for a password. I have not yet discovered the inner chainsaw. ;-)

Paul


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 12:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.