2017-07-03 44 views
1

我試圖創建一個批處理scrript文件,並創建一個ADS(備用數據流),以相同的文件,腳本如下:創建備用數據流一批中層文件運行

@echo off 


echo. 2>notSecret.txt 

echo. 2>notSecret.txt:secret 

@echo this is not a secret file... or is it :O > notSecret.txt 

@echo this is the secret part! > notSecret.txt:secret 
@echo great work >>notSecret.txt:secret 
@echo you found it >> notSecret.txt:secret 

該文件被創建,但它的ADS不是。

回答

0

我們需要的ADS呼應

@echo off 

echo this is not a secret file... or is it :O > notSecret.txt 

echo this is the secret part! > notSecret.txt:Secret.txt 
+1

也應該不帶擴展工作添加.txt文件擴展名。 – Stephan

+0

只爲擴展名爲我工作 –