Batch: Include the content of a text file in a variable.
Solved
Nicodelamort
Posted messages
13
Status
Member
-
Nicodelamort Posted messages 13 Status Member -
Nicodelamort Posted messages 13 Status Member -
```plaintext
Hello, I would like to include the content of a text file in a variable without including the last 7 characters.
Let me explain: the file contains a path as well as the filename.
That is to say like this: C:\[path]\XXX.extension
I know how to include the entire content of the file
But I have no idea how to remove the last 7 characters :/
I hope my explanations are clear and I thank you in advance. ```
Let me explain: the file contains a path as well as the filename.
That is to say like this: C:\[path]\XXX.extension
I know how to include the entire content of the file
set /p Var= < file.txt
But I have no idea how to remove the last 7 characters :/
I hope my explanations are clear and I thank you in advance. ```