Advertisement
tutorfree

Menu_login_-_operacoes com arquivos

Sep 13th, 2015
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.43 KB | None | 0 0
  1. @echo off
  2. title RECURSOS DIVERSOS
  3. :inicio
  4. color 2f
  5. cls
  6. echo =============================================================
  7. echo                    RECURSOS DIVERSOS
  8. echo =============================================================
  9. echo.
  10. echo                   [1] CRIAR ARQUIVOS
  11. echo                   [2] ORGANIZAR ARQUIVOS
  12. echo                   [3] OCULTAR ARQUIVOS
  13. echo                   [4] EXIBIR ARQUIVOS
  14. echo                   [5] EXCLUIR ARQUIVOS
  15. echo                   [6] SAIR
  16. echo.
  17. echo =============================================================
  18. set /p op=Escolha a sua opcao...
  19. if "%op%" == "1" goto:criar
  20. if "%op%" == "2" goto:organizar
  21. if "%op%" == "3" goto:ocultar
  22. if "%op%" == "4" goto:exibir
  23. if "%op%" == "5" goto:excluir
  24. if "%op%" == "6" goto:sair else
  25. echo OPCAO INVALIDA!!!
  26. pause
  27. goto inicio
  28.  
  29. :criar
  30. for /L %%n in (1,1,4) do echo set dir > arquivo%%n.doc
  31. for /L %%n in (1,1,4) do echo set dir > arquivo%%n.xls
  32. for /L %%n in (1,1,4) do echo set dir > arquivo%%n.ppt
  33. for /L %%n in (1,1,4) do echo set dir > arquivo%%n.mdb
  34. pause
  35. goto inicio
  36.  
  37. :organizar
  38. c:
  39. cd\Users\%username%\Desktop
  40. md word
  41. md excel
  42. md powerpoint
  43. md access
  44. for /L %%n in (1,1,4) do move arquivo%%n*.doc C:\Users\%username%\Desktop\word
  45. for /L %%n in (1,1,4) do move arquivo%%n*.xls C:\Users\%username%\Desktop\excel
  46. for /L %%n in (1,1,4) do move arquivo%%n*.ppt C:\Users\%username%\Desktop\powerpoint
  47. for /L %%n in (1,1,4) do move arquivo%%n*.mdb C:\Users\%username%\Desktop\access
  48. cls
  49. echo ARQUIVOS ORGANIZADOS COM SUCESSO!!
  50. pause
  51. goto inicio
  52.  
  53. :ocultar
  54. cls
  55. call login.bat
  56. c:
  57. cd\Users\%username%\Desktop\
  58. attrib word +h +r
  59. attrib excel +h +r
  60. attrib powerpoint +h +r
  61. attrib access +h +r
  62. cls
  63. color 2f
  64. echo ARQUIVOS OCULTADOS COM SUCESSO!
  65. pause
  66. goto inicio
  67.  
  68. :exibir
  69. cls
  70. call login.bat
  71. c:
  72. cd\Users\%username%\Desktop
  73. attrib word -h -r
  74. attrib excel -h -r
  75. attrib powerpoint -h -r
  76. attrib access -h -r
  77. echo ARQUIVOS REEXIBIDOS COM SUCESSO!
  78. pause
  79. goto inicio
  80.  
  81. :excluir
  82. cls
  83. call login.bat
  84. set /p deleta=Deseja realmente excluir os arquivos? [s/n]...
  85. if "%deleta%" == "s" (
  86. C:
  87. cd\Users\%username%\Desktop
  88. del /f /s /q "word"
  89. del /f /s /q "excel"
  90. del /f /s /q "powerpoint"
  91. del /f /s /q "access"
  92. rd word
  93. rd excel
  94. rd powerpoint
  95. rd access
  96. cls
  97. echo ARQUIVOS EXCLUIDOS COM SUCESSO!!!
  98. pause
  99. goto inicio) else (goto inicio)
  100.  
  101. :sair
  102. set /p resp=Deseja realmente sair? [s/n]...
  103. if "%resp%" == "s" (exit) else (goto inicio)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement