Unable to find some of hidden files (purposely hidden using a .bat file). The .bat file is missing now












0















I had used a .bat file to hide some of my files but now I can not locate that .bat file using which I used to open my hidden directory. How can I get my files back? The files were in C drive.



I have used below codes in .bat file:



cls
@ECHO OFF
title Folder Private
if EXIST "HTG Locker" goto UNLOCK
if NOT EXIST Private goto MDLOCKER

: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 Private "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%== PASSWORD_GOES_HERE goto FAIL
attrib -h -s "HTG Locker"
ren "HTG Locker" Private
echo Folder Unlocked successfully
goto End

:FAIL
echo Invalid password
goto end

:MDLOCKER
md Private
echo Private created successfully
goto End

:End









share|improve this question





























    0















    I had used a .bat file to hide some of my files but now I can not locate that .bat file using which I used to open my hidden directory. How can I get my files back? The files were in C drive.



    I have used below codes in .bat file:



    cls
    @ECHO OFF
    title Folder Private
    if EXIST "HTG Locker" goto UNLOCK
    if NOT EXIST Private goto MDLOCKER

    :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 Private "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%== PASSWORD_GOES_HERE goto FAIL
    attrib -h -s "HTG Locker"
    ren "HTG Locker" Private
    echo Folder Unlocked successfully
    goto End

    :FAIL
    echo Invalid password
    goto end

    :MDLOCKER
    md Private
    echo Private created successfully
    goto End

    :End









    share|improve this question



























      0












      0








      0








      I had used a .bat file to hide some of my files but now I can not locate that .bat file using which I used to open my hidden directory. How can I get my files back? The files were in C drive.



      I have used below codes in .bat file:



      cls
      @ECHO OFF
      title Folder Private
      if EXIST "HTG Locker" goto UNLOCK
      if NOT EXIST Private goto MDLOCKER

      :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 Private "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%== PASSWORD_GOES_HERE goto FAIL
      attrib -h -s "HTG Locker"
      ren "HTG Locker" Private
      echo Folder Unlocked successfully
      goto End

      :FAIL
      echo Invalid password
      goto end

      :MDLOCKER
      md Private
      echo Private created successfully
      goto End

      :End









      share|improve this question
















      I had used a .bat file to hide some of my files but now I can not locate that .bat file using which I used to open my hidden directory. How can I get my files back? The files were in C drive.



      I have used below codes in .bat file:



      cls
      @ECHO OFF
      title Folder Private
      if EXIST "HTG Locker" goto UNLOCK
      if NOT EXIST Private goto MDLOCKER

      :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 Private "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%== PASSWORD_GOES_HERE goto FAIL
      attrib -h -s "HTG Locker"
      ren "HTG Locker" Private
      echo Folder Unlocked successfully
      goto End

      :FAIL
      echo Invalid password
      goto end

      :MDLOCKER
      md Private
      echo Private created successfully
      goto End

      :End






      batch-file






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 23 at 18:55









      Rey Juna

      610111




      610111










      asked Jan 23 at 18:17









      Nishant KashyapNishant Kashyap

      61




      61






















          2 Answers
          2






          active

          oldest

          votes


















          4














          All you have done in your script is rename "Private" to "HTG Locker" and turn on the hidden and system attributes.



          You can simply go to File Explorer options, select "Show Hidden Files", untick "Hide Protected Operating System Files" and you can see it.



          If you don't know where it is, after doing that, search for folders on C volume called "Private" or "HTG Locker".



          File Explorer Options



          It isn't a terribly secure way of hiding things really.






          share|improve this answer


























          • thanks for the reply. Actually I have lost the .bat file and I have tried your suggested fix but still I am not getting any files/folder as named Private. I think somehow the .bat file is deleted and I don't know what happens to those hidden files.

            – Nishant Kashyap
            Jan 23 at 20:20











          • Try searching for "HTG Locker" as well as "Private". The script renames "Private" to "HTG Locker" and sets the flags to hide it. Then next time it changes the flags back and renames it back. I tried the .bat in your question and it works reliably but your folders could have either state depending whether you last locked or unlocked it.

            – lx07
            Jan 23 at 21:13






          • 1





            Hidden files aren't affected at all by deletion of the .bat file. If they were there, they are still there, just hidden. If they aren't there, then they were deleted somehow or you're looking in the wrong place. The .bat file is unrelated.

            – gronostaj
            Jan 23 at 21:16



















          0














          You can search based on the content of the file and not just the name. In the search box in File Explorer, type content: and then type something that should be in the file. If it's there, you should be able to find it. Be sure you're searching the folder where you expect it to be or the entire drive.






          share|improve this answer
























          • I have used this content:xxx... search option but no luck. I think the .bat file is somehow deleted and that is also not in recycle bin. Is there any way to restore the files that was hidden?? I can not recall the file names but those were zipped. I have also tried to search for all zip files, but no luck.

            – Nishant Kashyap
            Jan 23 at 19:47











          • You might be able to right-click on the folder where the file was and choose Previous Versions but that depends if it's set up or not.

            – HazardousGlitch
            Jan 23 at 20:06











          • I don't think that I can go to previous versions as the option is not coming on right click. Could you please tell me where the files goes whenever we try to hide them using those .bat command that I have mentioned above?

            – Nishant Kashyap
            Jan 23 at 20:12











          • @NishantKashyap They don't go anywhere. You have just hidden them without moving them.

            – DavidPostill
            Jan 23 at 21:32











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1397587%2funable-to-find-some-of-hidden-files-purposely-hidden-using-a-bat-file-the-b%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          All you have done in your script is rename "Private" to "HTG Locker" and turn on the hidden and system attributes.



          You can simply go to File Explorer options, select "Show Hidden Files", untick "Hide Protected Operating System Files" and you can see it.



          If you don't know where it is, after doing that, search for folders on C volume called "Private" or "HTG Locker".



          File Explorer Options



          It isn't a terribly secure way of hiding things really.






          share|improve this answer


























          • thanks for the reply. Actually I have lost the .bat file and I have tried your suggested fix but still I am not getting any files/folder as named Private. I think somehow the .bat file is deleted and I don't know what happens to those hidden files.

            – Nishant Kashyap
            Jan 23 at 20:20











          • Try searching for "HTG Locker" as well as "Private". The script renames "Private" to "HTG Locker" and sets the flags to hide it. Then next time it changes the flags back and renames it back. I tried the .bat in your question and it works reliably but your folders could have either state depending whether you last locked or unlocked it.

            – lx07
            Jan 23 at 21:13






          • 1





            Hidden files aren't affected at all by deletion of the .bat file. If they were there, they are still there, just hidden. If they aren't there, then they were deleted somehow or you're looking in the wrong place. The .bat file is unrelated.

            – gronostaj
            Jan 23 at 21:16
















          4














          All you have done in your script is rename "Private" to "HTG Locker" and turn on the hidden and system attributes.



          You can simply go to File Explorer options, select "Show Hidden Files", untick "Hide Protected Operating System Files" and you can see it.



          If you don't know where it is, after doing that, search for folders on C volume called "Private" or "HTG Locker".



          File Explorer Options



          It isn't a terribly secure way of hiding things really.






          share|improve this answer


























          • thanks for the reply. Actually I have lost the .bat file and I have tried your suggested fix but still I am not getting any files/folder as named Private. I think somehow the .bat file is deleted and I don't know what happens to those hidden files.

            – Nishant Kashyap
            Jan 23 at 20:20











          • Try searching for "HTG Locker" as well as "Private". The script renames "Private" to "HTG Locker" and sets the flags to hide it. Then next time it changes the flags back and renames it back. I tried the .bat in your question and it works reliably but your folders could have either state depending whether you last locked or unlocked it.

            – lx07
            Jan 23 at 21:13






          • 1





            Hidden files aren't affected at all by deletion of the .bat file. If they were there, they are still there, just hidden. If they aren't there, then they were deleted somehow or you're looking in the wrong place. The .bat file is unrelated.

            – gronostaj
            Jan 23 at 21:16














          4












          4








          4







          All you have done in your script is rename "Private" to "HTG Locker" and turn on the hidden and system attributes.



          You can simply go to File Explorer options, select "Show Hidden Files", untick "Hide Protected Operating System Files" and you can see it.



          If you don't know where it is, after doing that, search for folders on C volume called "Private" or "HTG Locker".



          File Explorer Options



          It isn't a terribly secure way of hiding things really.






          share|improve this answer















          All you have done in your script is rename "Private" to "HTG Locker" and turn on the hidden and system attributes.



          You can simply go to File Explorer options, select "Show Hidden Files", untick "Hide Protected Operating System Files" and you can see it.



          If you don't know where it is, after doing that, search for folders on C volume called "Private" or "HTG Locker".



          File Explorer Options



          It isn't a terribly secure way of hiding things really.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 23 at 21:15

























          answered Jan 23 at 19:22









          lx07lx07

          594311




          594311













          • thanks for the reply. Actually I have lost the .bat file and I have tried your suggested fix but still I am not getting any files/folder as named Private. I think somehow the .bat file is deleted and I don't know what happens to those hidden files.

            – Nishant Kashyap
            Jan 23 at 20:20











          • Try searching for "HTG Locker" as well as "Private". The script renames "Private" to "HTG Locker" and sets the flags to hide it. Then next time it changes the flags back and renames it back. I tried the .bat in your question and it works reliably but your folders could have either state depending whether you last locked or unlocked it.

            – lx07
            Jan 23 at 21:13






          • 1





            Hidden files aren't affected at all by deletion of the .bat file. If they were there, they are still there, just hidden. If they aren't there, then they were deleted somehow or you're looking in the wrong place. The .bat file is unrelated.

            – gronostaj
            Jan 23 at 21:16



















          • thanks for the reply. Actually I have lost the .bat file and I have tried your suggested fix but still I am not getting any files/folder as named Private. I think somehow the .bat file is deleted and I don't know what happens to those hidden files.

            – Nishant Kashyap
            Jan 23 at 20:20











          • Try searching for "HTG Locker" as well as "Private". The script renames "Private" to "HTG Locker" and sets the flags to hide it. Then next time it changes the flags back and renames it back. I tried the .bat in your question and it works reliably but your folders could have either state depending whether you last locked or unlocked it.

            – lx07
            Jan 23 at 21:13






          • 1





            Hidden files aren't affected at all by deletion of the .bat file. If they were there, they are still there, just hidden. If they aren't there, then they were deleted somehow or you're looking in the wrong place. The .bat file is unrelated.

            – gronostaj
            Jan 23 at 21:16

















          thanks for the reply. Actually I have lost the .bat file and I have tried your suggested fix but still I am not getting any files/folder as named Private. I think somehow the .bat file is deleted and I don't know what happens to those hidden files.

          – Nishant Kashyap
          Jan 23 at 20:20





          thanks for the reply. Actually I have lost the .bat file and I have tried your suggested fix but still I am not getting any files/folder as named Private. I think somehow the .bat file is deleted and I don't know what happens to those hidden files.

          – Nishant Kashyap
          Jan 23 at 20:20













          Try searching for "HTG Locker" as well as "Private". The script renames "Private" to "HTG Locker" and sets the flags to hide it. Then next time it changes the flags back and renames it back. I tried the .bat in your question and it works reliably but your folders could have either state depending whether you last locked or unlocked it.

          – lx07
          Jan 23 at 21:13





          Try searching for "HTG Locker" as well as "Private". The script renames "Private" to "HTG Locker" and sets the flags to hide it. Then next time it changes the flags back and renames it back. I tried the .bat in your question and it works reliably but your folders could have either state depending whether you last locked or unlocked it.

          – lx07
          Jan 23 at 21:13




          1




          1





          Hidden files aren't affected at all by deletion of the .bat file. If they were there, they are still there, just hidden. If they aren't there, then they were deleted somehow or you're looking in the wrong place. The .bat file is unrelated.

          – gronostaj
          Jan 23 at 21:16





          Hidden files aren't affected at all by deletion of the .bat file. If they were there, they are still there, just hidden. If they aren't there, then they were deleted somehow or you're looking in the wrong place. The .bat file is unrelated.

          – gronostaj
          Jan 23 at 21:16













          0














          You can search based on the content of the file and not just the name. In the search box in File Explorer, type content: and then type something that should be in the file. If it's there, you should be able to find it. Be sure you're searching the folder where you expect it to be or the entire drive.






          share|improve this answer
























          • I have used this content:xxx... search option but no luck. I think the .bat file is somehow deleted and that is also not in recycle bin. Is there any way to restore the files that was hidden?? I can not recall the file names but those were zipped. I have also tried to search for all zip files, but no luck.

            – Nishant Kashyap
            Jan 23 at 19:47











          • You might be able to right-click on the folder where the file was and choose Previous Versions but that depends if it's set up or not.

            – HazardousGlitch
            Jan 23 at 20:06











          • I don't think that I can go to previous versions as the option is not coming on right click. Could you please tell me where the files goes whenever we try to hide them using those .bat command that I have mentioned above?

            – Nishant Kashyap
            Jan 23 at 20:12











          • @NishantKashyap They don't go anywhere. You have just hidden them without moving them.

            – DavidPostill
            Jan 23 at 21:32
















          0














          You can search based on the content of the file and not just the name. In the search box in File Explorer, type content: and then type something that should be in the file. If it's there, you should be able to find it. Be sure you're searching the folder where you expect it to be or the entire drive.






          share|improve this answer
























          • I have used this content:xxx... search option but no luck. I think the .bat file is somehow deleted and that is also not in recycle bin. Is there any way to restore the files that was hidden?? I can not recall the file names but those were zipped. I have also tried to search for all zip files, but no luck.

            – Nishant Kashyap
            Jan 23 at 19:47











          • You might be able to right-click on the folder where the file was and choose Previous Versions but that depends if it's set up or not.

            – HazardousGlitch
            Jan 23 at 20:06











          • I don't think that I can go to previous versions as the option is not coming on right click. Could you please tell me where the files goes whenever we try to hide them using those .bat command that I have mentioned above?

            – Nishant Kashyap
            Jan 23 at 20:12











          • @NishantKashyap They don't go anywhere. You have just hidden them without moving them.

            – DavidPostill
            Jan 23 at 21:32














          0












          0








          0







          You can search based on the content of the file and not just the name. In the search box in File Explorer, type content: and then type something that should be in the file. If it's there, you should be able to find it. Be sure you're searching the folder where you expect it to be or the entire drive.






          share|improve this answer













          You can search based on the content of the file and not just the name. In the search box in File Explorer, type content: and then type something that should be in the file. If it's there, you should be able to find it. Be sure you're searching the folder where you expect it to be or the entire drive.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 23 at 18:51









          HazardousGlitchHazardousGlitch

          49019




          49019













          • I have used this content:xxx... search option but no luck. I think the .bat file is somehow deleted and that is also not in recycle bin. Is there any way to restore the files that was hidden?? I can not recall the file names but those were zipped. I have also tried to search for all zip files, but no luck.

            – Nishant Kashyap
            Jan 23 at 19:47











          • You might be able to right-click on the folder where the file was and choose Previous Versions but that depends if it's set up or not.

            – HazardousGlitch
            Jan 23 at 20:06











          • I don't think that I can go to previous versions as the option is not coming on right click. Could you please tell me where the files goes whenever we try to hide them using those .bat command that I have mentioned above?

            – Nishant Kashyap
            Jan 23 at 20:12











          • @NishantKashyap They don't go anywhere. You have just hidden them without moving them.

            – DavidPostill
            Jan 23 at 21:32



















          • I have used this content:xxx... search option but no luck. I think the .bat file is somehow deleted and that is also not in recycle bin. Is there any way to restore the files that was hidden?? I can not recall the file names but those were zipped. I have also tried to search for all zip files, but no luck.

            – Nishant Kashyap
            Jan 23 at 19:47











          • You might be able to right-click on the folder where the file was and choose Previous Versions but that depends if it's set up or not.

            – HazardousGlitch
            Jan 23 at 20:06











          • I don't think that I can go to previous versions as the option is not coming on right click. Could you please tell me where the files goes whenever we try to hide them using those .bat command that I have mentioned above?

            – Nishant Kashyap
            Jan 23 at 20:12











          • @NishantKashyap They don't go anywhere. You have just hidden them without moving them.

            – DavidPostill
            Jan 23 at 21:32

















          I have used this content:xxx... search option but no luck. I think the .bat file is somehow deleted and that is also not in recycle bin. Is there any way to restore the files that was hidden?? I can not recall the file names but those were zipped. I have also tried to search for all zip files, but no luck.

          – Nishant Kashyap
          Jan 23 at 19:47





          I have used this content:xxx... search option but no luck. I think the .bat file is somehow deleted and that is also not in recycle bin. Is there any way to restore the files that was hidden?? I can not recall the file names but those were zipped. I have also tried to search for all zip files, but no luck.

          – Nishant Kashyap
          Jan 23 at 19:47













          You might be able to right-click on the folder where the file was and choose Previous Versions but that depends if it's set up or not.

          – HazardousGlitch
          Jan 23 at 20:06





          You might be able to right-click on the folder where the file was and choose Previous Versions but that depends if it's set up or not.

          – HazardousGlitch
          Jan 23 at 20:06













          I don't think that I can go to previous versions as the option is not coming on right click. Could you please tell me where the files goes whenever we try to hide them using those .bat command that I have mentioned above?

          – Nishant Kashyap
          Jan 23 at 20:12





          I don't think that I can go to previous versions as the option is not coming on right click. Could you please tell me where the files goes whenever we try to hide them using those .bat command that I have mentioned above?

          – Nishant Kashyap
          Jan 23 at 20:12













          @NishantKashyap They don't go anywhere. You have just hidden them without moving them.

          – DavidPostill
          Jan 23 at 21:32





          @NishantKashyap They don't go anywhere. You have just hidden them without moving them.

          – DavidPostill
          Jan 23 at 21:32


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1397587%2funable-to-find-some-of-hidden-files-purposely-hidden-using-a-bat-file-the-b%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to make a Squid Proxy server?

          Is this a new Fibonacci Identity?

          19世紀