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.
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).
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.
Create a TrueCrypt container and keep the files you want to hide there.
You can change permissions to disallow access to the parent folder.
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.