Ce code vous permet de cacher un dossier (si vous avez des dossiers sensibles)
par exemple votre dossier est : "C:\interdit aux autres" vous pouvez faire:
vishid "C:\interdit aux autres" /fr
pour rétablir à l'état initial votre dossier il faut vous mettre dans le même répertoire que celui-ci et faire:
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
::
:: C-NAME: VISHID.Cmd
:: AUTHOR: WALID
:: DATE-C: 08/04/2009
::
:: SYNTAX: VISHID [Folder | * ] [Opt]
:: EX-SYN: VISHID FolderTest /pc
::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off & setlocal
:-
Set id1="Panneau de configuration.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
Set id2="Poste de travail.{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
Set id3="connexion r‚seau.{7007ACC7-3202-11D1-AAD2-00805FC1270E}"
Set id4="print.{2227A280-3AEA-1069-A2DE-08002B30309D}"
Set id5="Tƒches planifi‚es.{D6277990-4C6A-11CF-8D87-00AA0060F5BF}"
Set id6="Favoris r‚seau.{208D2C60-3AEA-1069-A2D7-08002B30309D}"
:
If %1!==! goto :aide
If %1!==*! Set ?=TopSecret &goto :suite
If not exist "%~1" (cls&echo/
echo:Le chemin: "%~pd0"&echo:ne comporte pas un dossier: "%*"&goto :EOF)
:suite
Set dmy=%1
for %%a In (pc pt cr pr tp fr) do echo.%*|find /i "/%%a" >nul && goto :-%%a
goto :aide
:-PC
If defined ? Set dmy=
Ren %dmy% %id1% %?%
goto :EOF
:-PT
If defined ? Set dmy=
Ren %dmy% %id2% %?%
goto :EOF
:-CR
If defined ? Set dmy=
Ren %dmy% %id3% %?%
goto :EOF
:-PR
If defined ? Set dmy=
Ren %dmy% %id4% %?%
goto :EOF
:-TP
If defined ? Set dmy=
Ren %dmy% %id5% %?%
goto :EOF
:-FR
If defined ? Set dmy=
Ren %dmy% %id6% %?%
goto :EOF
:aide
cls
echo: Syntaxe: %~nx0 [Dossier-…-cacher] [/Option]
echo: %~nx0 * [/Option]
echo[
echo: /Option
echo: ==============================
echo: /pc Panneau de configuration
echo: /pt Poste de travail
echo: /cr Connexion r‚seau
echo: /pr Dossier print
echo: /tp Tƒche plannifi‚es
echo: /fr Favoris r‚seau
echo]
echo: %~nx0 DossierCible /pc
echo: "DossierCible" en Panneau de configuration
echo.
echo: %~nx0 * /pc
echo: r‚tabli le dossier en "TopSecret"
echo.
echo: %~nx0 "Mon Dossier Secret" /cr
echo: "Mon Dossier Secret" en Connexion r‚seau
echo. |
Partager