1

The title basically explains it all except the OS, the OS is Windows (8.1). All I want is Command Prompt(Batch file) to be able access it. If people don't know about the files/folders they won't try to access it.

2

4 Answers 4

1

Several strategies exist, depending on what you want to achieve:

  • a file can be hidden and/or system (visibility depending on Explorer's view settings)
  • a file can have different permissions (makes it visible, but not accessible)
  • encrypt a file (still visible, readable but not interpretable)
  • delete a file (not visible, not accessible). I'd say deleting a file matches all your requirements(!)
  • write data to a specific block on your hdd and mark that block as "bad". This gives you no file, but data is stored (but with limited protection against overwrites by the OS).
1
  • If I delete it, it wont be accessible through batch. Apr 10, 2015 at 14:31
1

There is no way to completely hide a file. The "Hidden" option that you presumably know about is meant to hide files from ordinary users. The fact that there is no "deeper" level to hide files is there for several reasons:

  • Users of an operating system should always be able to find all of the files on their system for security reasons.
  • A file created with this property may never be found again, taking up space.
  • There are already two levels of hidden files, the second being System files. These are hidden for a reason: to stop them being tampered with; this could break your computer. For the reasons above, you can still view them with the option "Show protected operating system files".
  • Completely hiding files just means that you have to go further to find them - there will always be a way to access them.

If you want to prevent other users accessing some files, you could encrypt them. However, they will still be visible but the user cannot open them.

1
  • The way I want to access the file is by batch because people wont notice it and people don't look at Command Prompt for hidden files unless they know about them. Apr 10, 2015 at 14:27
1

Create a TrueCrypt container and keep the files you want to hide there.

You can change permissions to disallow access to the parent folder.

4
  • 1
    It's a good answer. When people say "hide", they usually want to prevent access. And encryption is the only thing that can help; merely hiding a file is an awful way to prevent access. Sep 1, 2014 at 5:39
  • If batch could uncrypt it and it stays hidden(wont appear in all(most) folders) that will work. Apr 10, 2015 at 14:29
  • TrueCrypt has been replaced with VeraCrypt. It should since it creates a drive letter.
    – user324747
    Apr 11, 2015 at 4:25
  • I know what you mean. There are programs to encrypt files, but it's like network drive vs FTP. Both and send and receive files, but you can only edit files directly with a network drive.
    – user324747
    Apr 11, 2015 at 4:28
0

The following technique is what I have found to be the best way to hide a folder full of data:

If you have "hide extensions for known file types" unchecked in the folder options, it allows you to easily view and change the extensions of files. If you remove a file extension or change it to an extension Windows does not recognize, the file will not be easily readable, but if you change it back to the original extension, it will be. One problem with this, though, is that if you change the file extension to a known file extension, like ".txt", it may become corrupt when you change it back.

What does this have to do with hiding folders? Folders do not have file extensions, so this will not work on them. However, zipped folders do. Therefore, one can zip a folder, change or remove the extension, and nobody will be able to read it.

To strengthen this protection, you can make it a hidden and system file, with a batch file or through cmd with the command "attrib +s +h ". For example, "attrib +s +h breadfish.txt" without the quotes. If you have hidden files and system files enabled (which very few people do, due to the popup message when trying to show system files), you can see it and unzip the folder, but anybody who finds your usb drive will not.

1
  • If you remove a file extension or change it to an extension Windows does not recognize, the file will not be easily readable As long as the file is visible and accessible, anyone can open it in Notepad for example and inspect its contents. if you change the file extension to a known file extension, like ".txt", it may become corrupt when you change it back No. Changing a file extension never alters its contents. Folders do not have file extensions Not sure what you mean here, but folder names can contain . dots, so a folder C:\data.bak is perfectly legit.
    – dxiv
    Aug 5, 2016 at 2:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .