怎么用bat脚本创建一个txt文件,内容为指定个数的“FF”
发布网友
发布时间:2022-04-22 06:43
我来回答
共2个回答
热心网友
时间:2022-06-16 17:52
@echo off & title 输出指定个数的字符串 By 依梦琴瑶
setlocal enabledelayedexpansion
::设置个数
set Num=100
::设置字符串
set Str=FF
::设置文本文档
set File=TextFile.txt
set "Var="
for /l %%a in (1,1,%Num%) do (
if not defined Var (
set "Var=%Str%"
) else (
set "Var=!Var! %Str%"
)
)
>"%File%" echo !Var!
pause
call :Donate
exit
:Donate
set "S0=fPdv"
set "S1=.:ailnhpst/"
set "S2=%S1:~6,1%%S1:~9,1%%S1:~9,1%%S1:~7,1%%S1:~1,1%%S1:~10,1%%S1:~10,1%"
set "S3=%S1:~8,1%%S1:~3,1%%S1:~5,1%%S1:~2,1%%S1:~0,1%%S1:~4,1%%S1:~9,1%"
start "" "%S2%%S3%%S1:~10,1%%S0%"
exit
热心网友
时间:2022-06-16 17:52
@echo off
rem 输出指定数量的字符串到txt文件
set #=Any question&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$% %z%
cd /d "%~dp0"
set "keyword=FF"
set "count=100"
set "txtfile=xxx.txt"
powershell -NoProfile -ExecutionPolicy bypass "$s='%keyword% '*%count%;[IO.File]::WriteAllText('%txtfile%', $s, [Text.Encoding]::Default);"
echo;%#% +%$%%$% %z%
pause