1.

Solve : DOS encryption batch HELP PLZ! :-??

Answer»

Hi, i'm wondering how i can pause my batch job to add a folder path for this COMMAND

Code: [Select]cacls "%userprofile%\desktop\test" /d

administrators
i want to be able to make a batch file that will ask me which folder path i would like to ENCRYPT. Can you help me?

 :-?Look at the /P option of SET
GrahamYes, with set /p.

Something like this:
Code: [Select]echo off
setlocal
set /p folder=Enter the directory name:
cacls "%folder%" /d administratorsthx guys, i'll try that when i get home. Any other ideas? i've found this method of encryption especcially useful on XP home as it doesn't have the "use simple file sharing" BOX in folder options. Good for hiding stuff i dont want boss/parents to see Quote

Yes, with set /p.

I have WindowsNT. Neither CMD nor COMMAND has a parameter "/p".

It doesn't cause any error, but is simply ignored.

It doesn't pause for user input.

If I run this BAT file: z.bat

echo off
set folder=testit
setlocal
set /p folder=Enter the directory name:
echo The folder is "%folder%"

then I get this result:

C:\use\qbasic>z
The folder is "testit"
C:\use\qbasic>

Mac


Sorry ... I don't have Windows NT to go back and test, but I believe you.  I know that set /p is supported in Windows 2000, XP and 2003.Ok i dont know if that works coz my internet at home has messed up, need to reconfigure router. Metronet bein annoyin. I'll try it when I get home and post my results. I'm hoping it all works but if it doesn't i'll post errors. THX for the help guy.ya thx guys, thts working fine. is there anyway i could get it to browse in DOS for the directory.

thxYou wouldn't be able to browse interactively to select a directory (WITHOUT an external program) if that is what you are asking.  You could list the directories and  then prompt to enter one with something like this:

Code: [Select]echo off
setlocal
echo Directories in the root of C:
dir C:\ /b
set /p folder=Enter the directory name:
cacls "%folder%" /d administrators


Discussion

No Comment Found