Link to home
Start Free TrialLog in
Avatar of privateuser
privateuser

asked on

Create .cmd with attrib dos comand

Hi,

I need your help.
I want to make a .cmd with the dos command attrib, to unhide shared folders.
I've tried make one, but receive an error «path not found».
The command that I use via dos is:

attrib -h "T:\xxx\xxx" -s

the x's means the folder and subfolder.

How can i do this?

Thanks.

Best regards.
Avatar of n2fc
n2fc
Flag of United States of America image

Easy as pie!

1) Right click in an open area on your desktop and check NEW==>TEXT DOCUMENT (name it)

2) Right click on the newly created file, click RENAME and rename the ".txt" file to ".cmd"

NOTE: You will need to ensure that your FOLDER OPTIONS are set to NOT HIDE FILE EXTENSIONS to do this!

3) Right click on the new CMD file and select EDIT... You can now edit the command file as you wish... Just make sure to make the last line "pause" if you want to review what it did prior to closing itself!  Also, make sure to SAVE it when done editing!
ASKER CERTIFIED SOLUTION
Avatar of Steven Carnahan
Steven Carnahan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Right, and if the folder has system and hidden flag set, then you must probably remove both with one command, otherwise it will also fail
attrib -d -s /d "c:\path\folder"