Posts DOS - Create UT8 Textfile | Can be used also to read the ouput of console
Post
Cancel

DOS - Create UT8 Textfile | Can be used also to read the ouput of console

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo off
color c

REM -----------------------------Ask TaskName (folder)
set /p id_folder="Task Name: "

if exist "%id_folder%" (
	echo my lord, folder %id% already exists! think to CTRL+C
	pause
) ELSE (
	mkdir "%id_folder%"
)

REM -----------------------------Ask BlockID (files)

set /p id="Block ID: "

cd "%id_folder%"

if exist %id%en-dev.txt (
	echo my lord, file %id%en-dev.txt already exists!
	echo Operation Aborted...........
	pause
	exit
)

//set UTF8 -- the 65001 is UTF8
//http://stackoverflow.com/a/18088002
chcp 65001

type nul >%id%en-dev.txt
type nul >%id%en-prod.txt
type nul >%id%gr-dev.txt
type nul >%id%gr-prod.txt

REM -----------------------------Create modded folder
mkdir modded

:exit

origin - http://www.pipiscrew.com/?p=4022 dos-create-ut8-textfile-can-be-used-also-to-read-the-ouput-of-console

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags