A newer version of this documentation is available.

View Latest

format

Name

netid.exe -format – encode or decode file content

Synopsis

netid.exe -format [crlf <windows|unix>] [ascii] [base64 <encode|decode>]
    [hex <encode|decode>] [html <compact|images>]
    [compress -extension <file extension> -file <file path>]
    [expand -file <file path>] FILE

Description

The format command encodes or decodes the content of a file.

Options

crlf <windows|unix>

Format the new-line according to Windows (CR/LF) or Unix systems (CR).

ascii

Remove all non-ascii characters.

base64 <encode|decode>

Base64 encode or decode the file content.

hex <encode|decode>

Hexadecimal encode or decode the file content.

html <compact|images>
compact

Package all HTML/JS/CSS-files in a single HTML-file. The specified file is read and all referenced JS/CSS-files is loaded.

images

Package all referenced images within a HTML /JS/CSS-package. Requires that the undocumented internal format is used to reference images.

compress -extension <file extension> -file <file path>

Compress file content.

-extension <file extension>

Compression formats.

-file <file path>

File path

expand -file <file path>

Expand file content.

-file <file path>

File path

Examples

Example 1. Format the new-line according to Windows CR/LF format.
$ netid.exe -format crlf windows C:\Temp\aaa.txt
Example 2. Format the new-line according to Unix CR format.
$netid.exe -format crlf unix C:\Temp\aaa.txt
Example 3. Remove all non-ascii characters.
$netid.exe -format ascii C:\Temp\aaa.txt
Example 4. Base64 encode or decode the file content.
$ netid.exe -format base64 encode C:\Temp\aaa.txt
$ netid.exe -format base64 decode C:\Temp\aaa.txt
Example 5. Hexadecimal encode or decode the file content.
$ netid.exe -format hex encode C:\Temp\aaa.txt
$ netid.exe -format hex decode C:\Temp\aaa.txt
Example 6. Package all HTML/JS/CSS-files to a single HTML-file.

Reads the specified file and loads all referenced JS/CSS-files.

$ netid.exe -format html compact C:\Temp\aaa.html
Example 7. Package all referenced images within a HTML /JS/CSS-package.

Requires that the undocumented internal format is used to reference images.

$ netid.exe -format html images C:\Temp\aaa.html
Example 8. Compress or expand the file content:
The compress and expand options require that the file is preceded by the -file flag.
$ netid.exe -format compress -file C:\Temp\aaa.txt
$ netid.exe -format compress -extension gz -file C:\Temp\aaa.txt
$ netid.exe -format compress -extension z -file C:\Temp\aaa.txt
$ netid.exe -format expand -file C:\Temp\aaa.txt.gz
$ netid.exe -format expand -file C:\Temp\aaa.txt.z