Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Lost Folder  (Read 5001 times)

0 Members and 1 Guest are viewing this topic.

Tgizzo

    Topic Starter


    Greenhorn

    • Experience: Experienced
    • OS: Windows 8
    Lost Folder
    « on: February 23, 2015, 03:51:17 PM »
    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!

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Lost Folder
    « Reply #1 on: February 23, 2015, 04:35:05 PM »
    This general rule applies to current Windows versions:
    Quote
    Show or Hide Hidden Files and Folders
      1.  In the desktop, click or tap the File Explorer button on the taskbar.
      2.  Select the files or folders you want to hide or unhide.
      3.  Click or tap the Hide selected items button on the View tab.
      4.  Select the Hidden items check box on the View tab to show hidden files or folders.
    What is wrong with that? What do you want?. ???

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Lost Folder
    « Reply #2 on: February 23, 2015, 04:36:51 PM »
    batch file that hides files
    How does it accomplish this task?
    I was trying to dereference Null Pointers before it was cool.

    Tgizzo

      Topic Starter


      Greenhorn

      • Experience: Experienced
      • OS: Windows 8
      Re: Lost Folder
      « Reply #3 on: February 23, 2015, 05:40:42 PM »
      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 <Folder> 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.

      Tgizzo

        Topic Starter


        Greenhorn

        • Experience: Experienced
        • OS: Windows 8
        Re: Lost Folder
        « Reply #4 on: February 23, 2015, 05:41:00 PM »

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Lost Folder
        « Reply #5 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:

        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.
        I was trying to dereference Null Pointers before it was cool.

        Tgizzo

          Topic Starter


          Greenhorn

          • Experience: Experienced
          • OS: Windows 8
          Re: Lost Folder
          « Reply #6 on: February 23, 2015, 06:16:28 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:

          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.

          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?

          Tgizzo

            Topic Starter


            Greenhorn

            • Experience: Experienced
            • OS: Windows 8
            Re: Lost Folder
            « Reply #7 on: February 23, 2015, 06:31:24 PM »
            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? :(

            Tgizzo

              Topic Starter


              Greenhorn

              • Experience: Experienced
              • OS: Windows 8
              Re: Lost Folder
              « Reply #8 on: February 23, 2015, 06:48:13 PM »
              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