1.

Solve : dos command for not listing hidden files?

Answer»

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.then you should tackle the problem at the root. Disable cmd.exe and command.com totally. disabling command prompt may solve my problem, but at the same time I lose many dos utilities.
any other idea pleaseeeQuote from: divyap 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
describe you network architecture. If you are the administrator, you will have access to dos utilities, NOT your users. 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.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.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?no, I am not the administrator.
I have an application that CREATES a drive and I want to prevent access to it.


Quote from: divyap 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.




Sorry but you need to contact your network administrators and discuss this with them. They can take care of this problem for you.How can an administrator prevent access to a drive to all the users?Quote from: divyap on November 20, 2009, 03:18:31 AM
How can an administrator prevent access to a drive to all the users?
you can ask your administrator. Preventing access to a drive by all users is really quite simple.

disconnect it.HelloHelloQuote
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.


Discussion

No Comment Found