2진 파일 텍스트 가져오기
Verb:binaryReadString
사용 가능: <Standard>
이 명령을 사용하여 2진 파일에서 텍스트를 가져옵니다.
이 명령은 모든 파일 유형(.txt, .html, .pdf, ...)을 2진으로 해석합니다.
구문
binaryReadString --file(BinaryFileReader) (String)=value
입력
| 스크립트 | 디자이너 | 필수 | AcceptedTypes | 설명 |
|---|---|---|---|---|
| -- 파일 | 바이너리 리더 | 필수 | 2진 파일 리더 | 텍스트를 얻어야 하는 2진 파일입니다. 이 파일은 읽기를 위해 2진 파일 열기 명령으로 열립니다. |
출력
| 스크립트 | 디자이너 | AcceptedTypes | 설명 |
|---|---|---|---|
| 값 | 텍스트 | 텍스트 | 2진 파일에서 얻은 텍스트입니다. |
실시예
명령이 텍스트를 2진으로 가져오고 읽기를 위해 2진 파일 열기를 사용하여 파일을 열고 읽습니다.
defVar --name binaryReader --type BinaryFileReader
defVar --name valueText --type String
//Open the file informed for reading.
//Download the following file to execute the command.
openBinaryReader --share "Read" --path "binaryFile.txt" --encoding "Default" binaryReader=value
//Get text contained in file.
binaryReadString --file ${binaryReader} valueText=value
//Returns the text.
logMessage --message "${valueText}" --type "Info"
//Close the binary file.
binaryFileClose --file ${binaryReader}
비고
2진 파일 텍스트 가져오기 명령이 올바르게 작동하려면 2진 텍스트가 있는 파일이 필요합니다.
Binary reader 매개변수는 open Binary File for Reading 명령에 의해 생성되는 변수를 사용하며, 이 명령은 2진 값을 포함하는 파일을 보유합니다.