Bonjour Le Forum,
Je souhaiterais protéger un dossier avec un mot de passe, selon ces critères :
- Possibilité de nommer le nom du dossier (avec le code suivant le dossier s’appelle PRIVATE)
- Le dossier doit être dans une partie choisie de mon arborescence
- Je souhaiterais ouvrir le dossier avec un raccourci sur le fond d'écran
Comment adapté le code ?
Bonne journée
Seb
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 cls @ECHO OFF title Folder Private if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Private goto MDLOCKER :CONFIRM echo Etes vous sure de vouloir bloquer les fichiers Y=Oui N=Non(Y/N) set/p "cho=>" if %cho%==Y goto LOCK if %cho%==y goto LOCK if %cho%==n goto END if %cho%==N goto END echo Invalid choice. goto CONFIRM :LOCK ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" echo Folder locked goto End :UNLOCK echo Enter password to unlock folder set/p "pass=>" if NOT %pass%== tonpassici goto FAIL attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private echo Bien Bloquer GG goto End :FAIL echo Invalid password goto end :MDLOCKER md Private echo Private created successfully goto End :End
Partager