| 1. |
Solve : Lost Folder? |
|
Answer» So, I was testing out my new batch file that hides files, and then requires a password to un hide it, all from the file. The problem was that anybody could right click it, hit edit, then change the password to get to it(assuming they have basic computer knowledge). So I had made an .exe file that required a password to open, which all it did was open that file. Then I noticed, it wouldn't hide the specified folder because the .bat file that the .exe opened was in a different directory. So I made a shortcut to the folder, then I put the folder in the same directory. Sadly, then when I un-hid the .bat, the directory was gone, and it took the folder with it, as far as I know. The major problem is that the folder that was taked was my whole desktop. I had put everything into that folder to save space. Now I cannot FIND it. That folder is hidden, and it is nowhere to be found. I went to my control panel and clicked 'show hidden files and folders,' and I still can't find it. I went into cmd to locate the file using 'dir' commands, and come couldn't even find it. All of the files i the folder are hidden too, sadly. Please help ASAP, because I have important things in that folder that I need back. Thanks!This general rule applies to current Windows versions: Show or Hide Hidden Files and FoldersWhat is wrong with that? What do you want?. Quote from: Tgizzo on FEBRUARY 23, 2015, 03:51:17 PM batch file that hides filesHow does it accomplish this task?here is the code i wrote: cls @ECHO OFF title Folder Folder if EXIST "HTG Locker" goto UNLOCK :CONFIRM echo Are you sure you want to lock the folder(Y/N) set/p "cho=>" if %cho%==Y goto LOCK if %cho%==y goto LOCK if %cho%==n goto END if %cho%==N goto END echo Invalid choice. goto CONFIRM :LOCK ren Folder "HTG Locker" attrib +h +s "HTG Locker" echo Folder locked goto End :UNLOCK echo Enter password to unlock folder set/p "pass=>" if NOT %pass%== 12345 goto FAIL attrib -h -s "HTG Locker" ren "HTG Locker" Folder echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDLOCKER echo test pause :End 1. copy this and paste it in notepad and save it as a .bat file, save it to your desktop 2. make a new folder named on your desktop(no <>'s) 3.open the .bat, type y, then hit enter 4.the folder should disappear. 5. when you want it back, just re-open the batch file, then type in 12345,(that is the password), and hit enter. then it will appear on your desktop again. this is how it works. feel free to follow my instructions to try it out. keep it if you want. now the only problem is i placed my folder in a different location, and then the location i put it in vanished. i cant find that folder now. that is what i need help with. the folder was hidden.Quote from: BC_Programmer on February 23, 2015, 04:36:51 PM How does it accomplish this task?If a folder has the System and hidden attributes, it will not be visible in Windows Explorer. You can SEE system files using the /a switch on dir: Code: [Select]dir /as trying to search the whole drive would probably not be very useful, as a lot of files will have that attribute. You'd have to narrow it down. exe batch compilers typically just extract a batch file to a temporary location, then run the batch file. Usually, in the temp directory, so a good start would be to start in the %temp% folder.Quote from: BC_Programmer on February 23, 2015, 05:59:03 PM If a folder has the System and hidden attributes, it will not be visible in Windows Explorer. You can see system files using the /a switch on dir: i searched in command prompt again using your directions, and i searched where it would be, and all of temp, and my whole drive. all i got was 'file not found.' could i possibly restart my computer in a state from about a day ago? I found out what happened. i Wrote an .exe file that runs the batch, but runs it in a temporary folder. i, totally not thinking, put my files in the temporary folder while the executable file was running, causing it to get rid of it when i closed the program. i there a way to get it back now? Nevermind, I have figured out how to restore my computer to YESTERDAY's backup. It is restarting now. Thank you for all of your help BC_Programmer! I REALLY appreciate it |
|