Home / Microsoft / Microsoft DOS / dos command for not listing hidden files
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 2 [All] - (Bottom) Print
Author Topic: dos command for not listing hidden files  (Read 1826 times)
divyap
Guest
« on: November 18, 2009, 01:52:02 AM »

Hi,
    Is there any way to restrict dir command to list hidden files.
    I want to secure a drive. Even though i have modified registry settings to restrict access to a drive, dir command lists all the contents in the drive . I do not want any user to let to know the contents of that drive. So, please any body tell me that for a particular drive, dir command should fail.
IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #1 on: November 18, 2009, 02:04:01 AM »

then you should tackle the problem at the root. Disable cmd.exe and command.com totally.
IP logged

divyap
Guest
« Reply #2 on: November 18, 2009, 02:13:54 AM »

disabling command prompt may solve my problem, but at the same time I lose many dos utilities.
any other idea pleaseee
IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #3 on: November 18, 2009, 02:27:40 AM »

disabling command prompt may solve my problem, but at the same time I lose many dos utilities.
any other idea pleaseee
describe you network architecture. If you are the administrator, you will have access to dos utilities, NOT your users.
IP logged

divyap
Guest
« Reply #4 on: November 18, 2009, 02:54:55 AM »

Its a client server architecture. I do not want to let others know about the existence of the drive and its contents.In one of my applications, I have to launch internet explorer to open a document , there it shows the path to that document which helps in knowing the existence of the drive. Even though i create the files in the drive as hidden, dir /a shows hidden files which i do not want it to happen. so, I want some solution to make the drive inaccessible and prevent directory listing.
IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #5 on: November 18, 2009, 03:27:53 AM »

only you can have access to server command prompt as an administrator. There is no reason why a user can have access to the server to give a dir on your server! Is your application written in batch and then have to be installed on each user desktop ? If you want to restrict user keying in c:\ or equivalent at the URL text box of internet explorer, you can set those using global policies to restrict displaying drive information, or do some tweaking. Its been so long since i did that, so search internet for the exact method.
IP logged

mroilfield
Adviser



Thanked: 41
Posts: 952

Experience: Experienced
OS: Windows XP



1 1
« Reply #6 on: November 18, 2009, 09:19:17 AM »

gh0std0g

The way it sound to me is that the OP is not the administrator and is trying to hide something. I may be wrong but I would proceed with extreme caution.


Divyap,

Are you the administrator of this network?
« Last Edit: November 20, 2009, 02:32:57 AM by mroilfield » IP logged

You can't fix Stupid!!!
divyap
Guest
« Reply #7 on: November 20, 2009, 02:46:02 AM »

no, I am not the administrator.
I have an application that creates a drive and I want to prevent access to it.
   

IP logged
mroilfield
Adviser



Thanked: 41
Posts: 952

Experience: Experienced
OS: Windows XP



1 1
« Reply #8 on: November 20, 2009, 02:59:18 AM »

no, I am not the administrator.
I have an application that creates a drive and I want to prevent access to it.
   



Sorry but you need to contact your network administrators and discuss this with them. They can take care of this problem for you.
IP logged

You can't fix Stupid!!!
divyap
Guest
« Reply #9 on: November 20, 2009, 03:18:31 AM »

How can an administrator prevent access to a drive to all the users?
IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #10 on: November 20, 2009, 04:02:58 AM »

How can an administrator prevent access to a drive to all the users?
you can ask your administrator.
IP logged

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 #11 on: November 20, 2009, 05:12:37 AM »

Preventing access to a drive by all users is really quite simple.

disconnect it.
IP logged

billrich
Guest
« Reply #12 on: November 20, 2009, 06:37:01 PM »

Hello
« Last Edit: November 21, 2009, 10:33:16 PM by billrich » IP logged
billrich
Guest
« Reply #13 on: November 20, 2009, 06:47:06 PM »

Hello
« Last Edit: November 21, 2009, 10:32:27 PM by billrich » IP logged
Sidewinder
Guru



Thanked: 89
Posts: 4,315

Experience: Experienced
OS: Windows XP

« Reply #14 on: November 20, 2009, 07:00:33 PM »

Quote
Is there any way to restrict dir command to list hidden files.

Not really, but you can ensure that hidden files are listed by setting the dircmd environment variable.

Control Panel > System > Advanced tab > Environment Variables. Create
the system variable "DIRCMD" and assign a value of /a or /a:h

Note: dircmd parameters can be overridden on the command line but this might prove helpful.

Good luck.  8)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #15 on: November 20, 2009, 07:34:33 PM »



C:\>attrib  /?
Displays or changes file attributes.


C:\>attrib  +H  *.*

( set the +H  attrib for all files on that drive )

i bet you didn't test it out whether this is workable.
IP logged

billrich
Guest
« Reply #16 on: November 20, 2009, 08:10:01 PM »

Hello
« Last Edit: November 21, 2009, 10:31:27 PM by billrich » IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #17 on: November 20, 2009, 08:38:57 PM »

I did test test attrib +H *.*  for all files in one folder.  It did work. The dir command will not list the files while the files are hidden.
then try this
Code: [Select]
dir /AH
IP logged

mroilfield
Adviser



Thanked: 41
Posts: 952

Experience: Experienced
OS: Windows XP



1 1
« Reply #18 on: November 20, 2009, 11:54:27 PM »


Insult, browbeat and harass the OP (Original Poster ) .  Is this SOP ( standard operating procedure )  for Computer Hope?


How did we insult, browbeat or harass the OP?

It is not SOP to help some one do something that they shouldn't be doing either. In this case the OP is trying to hide something on a network that he is not the administrator of. If he needs this hidden he needs to go to the administrator and discuss the problem with them. If they decide to help that is their business.

We are not here to help circumvent, bypass, or other wise help some one do something that their network administrators will not allow.
IP logged

You can't fix Stupid!!!
billrich
Guest
« Reply #19 on: November 21, 2009, 10:14:56 AM »

Hello
« Last Edit: November 21, 2009, 10:27:47 PM by billrich » IP logged
milesman
Beginner



Thanked: 6
Posts: 93


« Reply #20 on: November 23, 2009, 02:20:53 PM »

Hello

Hello.
IP logged

(| Cha Cha Cha!
divyap
Guest
« Reply #21 on: November 24, 2009, 09:53:50 PM »

Not really, but you can ensure that hidden files are listed by setting the dircmd environment variable.

Control Panel > System > Advanced tab > Environment Variables. Create
the system variable "DIRCMD" and assign a value of /a or /a:h

Note: dircmd parameters can be overridden on the command line but this might prove helpful.

Good luck.  8)

Thank you very much.
IP logged
divyap
Guest
« Reply #22 on: November 24, 2009, 09:59:12 PM »

i bet you didn't test it out whether this is workable.

Even after changing the attributes of file to be hidden, dir /a lists all the hidden files in that directory. My requirement is not to have listing of the hidden files in any manner.
IP logged
mroilfield
Adviser



Thanked: 41
Posts: 952

Experience: Experienced
OS: Windows XP



1 1
« Reply #23 on: November 24, 2009, 10:42:04 PM »

Divyap,

Why can't you get your network administrators to help you do this? If it is because you don't want them to know about it then we can't help you.
IP logged

You can't fix Stupid!!!
divyap
Guest
« Reply #24 on: November 24, 2009, 11:50:32 PM »

>>>>
Why can't you get your network administrators to help you do this? If it is because you don't want them to know about it then we can't help you.


mroilfield,
               as you are thinking that I am hiding something from my network administrator.There is nothing like that.

                I am actually developing a security application that creates a ramdisk. Contents in that ramdisk need to be secured. And you might be knowing that ramdisk is not a physical drive whereas it acts as a physical drive. This drive can be mounted as well as unmounted. While it is mounted, sometimes there is a possibility for unauthorized users to get into the system and get the directory listing of that drive which I do not want. Thats it. I am not doing anything wrong as you are having an impression on me.

                It is my application requirement and what is required is bcoz f this application, ordinary functioning of the system should not be lost. My administrator itself wants it to be protected.....
« Last Edit: November 25, 2009, 12:44:17 AM by divyap » IP logged
Salmon Trout
Prodigy



Thanked: 501
Posts: 7,365

Computer: Specs
Experience: Guru
OS: Linux variant

1
« Reply #25 on: November 25, 2009, 02:02:39 AM »

Quote from: divyap
I am actually developing a security application that creates a ramdisk.

... You are a professional developer yet you have to trawl the web for help forums?
IP logged

Pages: 1 2 [All] - (Top) Print 
Home / Microsoft / Microsoft DOS / dos command for not listing hidden files « 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.111 seconds with 20 queries.