Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set path=
- set file=
- :top
- echo First, are the batch and file you wish to add bytes to in the same directory? (Y/N)
- set /p directory=
- if /i "%directory%"=="Y" goto good
- if /i "%directory%"=="n" goto bad
- echo Invalid answer
- goto top
- :good
- echo Enter the exact name of the file you wish too add bytes to (example: Minecraft.exe)
- set /p file=
- set files="%file%"
- if exist %files% goto continue
- echo The file cannot be found, please make sure you typed the name correctly and that the file is in the same directory as the batch.
- goto top
- :bad
- echo Please enter the file path of the file you wish to add bytes to. (Example: C:\users\username\desktop\)
- set /p path=
- cd %path%
- goto good
- :continue
- cd %path%
- set a=0
- echo Enter the number of bytes you wish to add to the file: (1,000 bytes = 1KB. 1,000KB = 1MB)
- echo ONLY enter numbers, letters will cause an error (a good example would be 1000).
- set /p bytes=
- set /a b=%bytes%/3
- :loop
- if %a%==%b% goto end
- set /a a=%a%+1
- echo a>>randomer.txt
- goto loop
- :end
- type randomer.txt>>%files%
- del /f /q randomer.txt
- echo Operation was successful!
- ping -n 7 localhost > nul
Advertisement
Add Comment
Please, Sign In to add comment