Skip to content

Instantly share code, notes, and snippets.

@tanaytoshniwal
Last active December 21, 2017 07:29
Show Gist options
  • Save tanaytoshniwal/02f974d7df2fa9a5d4c50b63001a98a8 to your computer and use it in GitHub Desktop.
Save tanaytoshniwal/02f974d7df2fa9a5d4c50b63001a98a8 to your computer and use it in GitHub Desktop.
Hide selected files and folders from batch file
:: move to desired local drive(D in this case) and the location of file or folder using "cd" command
D:&
:: use attrib command with attributes +h +r and +s followed by the name of file(with extension) or folder
attrib +h +r +s File.txt
:: if you want to hide more files and folders use "&" followed by another attrib command same as mentioned above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment