Make a file hidden from a batch script

后端 未结 2 1175
[愿得一人]
[愿得一人] 2021-01-23 13:54

Does anyone know how I can use the batch code to hide a file? This is my code:

@echo off
start ChromePass.exe /stext ChromePass.txt
start iepv.exe /stext iepv.tx         


        
2条回答
  •  鱼传尺愫
    2021-01-23 14:46

    Here's another way using stream:

    Hide.bat

    @echo off
    more < file.txt > fileB.txt:stream1
    pause
    
    • Read from file.txt and echo the content into fileB.txt's stream1
    • Note:

    Normal file explorer/ text editor can see the file, but cannot read the content inside it

    Read.bat

    @echo off
    more < fileB.txt:stream1 
    pause
    
    • Read fileB.txt's content from stream1

    See: https://ss64.com/nt/echo.html

提交回复
热议问题