3

I want my batch file to take input from the user and give "Full Access" permissions to a specific folder(the path will be hard coded) to the set of users, entered by the user. The user enters a comma seperated list of user names in the form(domain\username). Please help me!!!!!!!!!! :(

lvkchaitanya
  • 33
  • 1
  • 3

1 Answers1

2

In windows XP you could use the following command

cacls C:\GNUPG /T /E /G everyone:F

If username is passed as first parameter to the batch file use the following command

cacls C:\GNUPG /T /E /G %1:F

In the above parameter "C:\GNUPG" is the path name

AbrahamJP
  • 3,425
  • 7
  • 30
  • 39
  • thanks abraham but the user list is taken using set /p users. As u might have guessed users is a variable and I plan to parse this variable to extract users based on the "," delimiter and then assign permissions – lvkchaitanya Feb 10 '11 at 12:16
  • You can find information on parsing comma delimited strings using batch file in these links http://stackoverflow.com/questions/2164895/how-do-i-get-a-for-loop-to-work-on-a-single-line-comma-delimited-string-with-spac http://stackoverflow.com/questions/2112694/how-do-i-get-a-for-loop-to-work-with-a-comma-delimited-string – AbrahamJP Feb 10 '11 at 18:21