Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save harshithjv/e599dbfcfd0b9f9b6804de43863da811 to your computer and use it in GitHub Desktop.

Select an option

Save harshithjv/e599dbfcfd0b9f9b6804de43863da811 to your computer and use it in GitHub Desktop.

Type is cat of CMD

type \Path\To\File

E.g.:

C:\> type .\a_file.txt

This is the file content...

Set /P to copy file content to variable

C:\> set /p CONTENT=<C:\a_file.txt

C:\> echo %CONTENT%

This is the file content...

Reference

https://stackoverflow.com/a/21215310/781020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment