[windows] Windows batch script to unhide files hidden by virus

Since I'm seing many people having their files hidden by flash drive viruses, I'm giving them a Windows command line using attrib (or using Linux) to solve the problem when the infected files are removed and the their files are still "missing". The command removing file and folders properties system, hidden and arquive (not really needed):

attrib -s -h -a /s /d <drive letter>:\*.*

Does anyone know a how to make a script to prompt the user for the drive letter or folder? I've already seen some software that does something like this but I think this would be better.

thx!

[Solved] Solved using Cheeso's code as base

@ECHO OFF
ECHO "Enter Drive letter"
set /p letter=

attrib -s -h -a /s /d %letter%:*.*

[Improved a bit]

@ECHO OFF
ECHO Type the drive letter. ONLY the letter.
ECHO ALL FILES ARE GOING TO BE MODIFIED!!!
set /p letter=

ECHO %letter%: selected
taskkill /im explorer.exe /f
ECHO.
ECHO "Modifying files..."
ECHO.

attrib -s -h -a /s /d %letter%:\*.*

ECHO "Process completed."

start explorer %letter%:
taskkill /im cmd.exe /f

This question is related to windows batch-file hidden

The answer is


Try this one. Hope this is working fine.. :)

@ECHO off

cls

ECHO.

set drvltr=

set /p drvltr=Enter Drive letter: 

attrib -s -h -a /s /d  %drvltr%:\*.*

ECHO Unhide Completed

pause

this will unhide all files and folders on your computer

attrib -r -s -h /S /D

Try this.

Does not require any options to change.

Does not require any command line activity.

Just run software and you will done the job.

www.vhghorecha.in/unhide-all-files-folders-virus/

Happy Knowledge Sharing


Examples related to windows

"Permission Denied" trying to run Python on Windows 10 A fatal error occurred while creating a TLS client credential. The internal error state is 10013 How to install OpenJDK 11 on Windows? I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."? git clone: Authentication failed for <URL> How to avoid the "Windows Defender SmartScreen prevented an unrecognized app from starting warning" XCOPY: Overwrite all without prompt in BATCH Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory how to open Jupyter notebook in chrome on windows Tensorflow import error: No module named 'tensorflow'

Examples related to batch-file

'ls' is not recognized as an internal or external command, operable program or batch file '' is not recognized as an internal or external command, operable program or batch file XCOPY: Overwrite all without prompt in BATCH CanĀ“t run .bat file under windows 10 Execute a batch file on a remote PC using a batch file on local PC Windows batch - concatenate multiple text files into one How do I create a shortcut via command-line in Windows? Getting Error:JRE_HOME variable is not defined correctly when trying to run startup.bat of Apache-Tomcat Curl not recognized as an internal or external command, operable program or batch file Best way to script remote SSH commands in Batch (Windows)

Examples related to hidden

bootstrap 4 responsive utilities visible / hidden xs sm lg not working How to get current formatted date dd/mm/yyyy in Javascript and append it to an input Hidden property of a button in HTML What's the best way to identify hidden characters in the result of a query in SQL Server (Query Analyzer)? Making a button invisible by clicking another button in HTML Check div is hidden using jquery Windows batch script to unhide files hidden by virus jQuery - Detect value change on hidden input field posting hidden value Make one div visible and another invisible