How to modify a .txt file using .bat?
Solved
-
Hello, I am asking this question on the forum because
I do not know how to modify a .txt with a .bat
Example:
I want that in the .bat I can
add a sentence in a .txt "contact"
Thank you in advance
Best regards,
Johan
I do not know how to modify a .txt with a .bat
Example:
I want that in the .bat I can
add a sentence in a .txt "contact"
Thank you in advance
Best regards,
Johan
1 answer
-
ModeratorHi,
echo contact >> %Path%-
-
-
@fabulOf course, my text file is located at: C:\Users\Megaport\Desktop\test\test.txt
-
Moderator@TheKiller3-johanecho contact >> C:\Users\Megaport\Desktop\test\test.txt
Or
echo contact >> %UserProfile%\Desktop\test\test.txt
Or
(If your .bat is in the same folder as your .txt)
echo contact >> %test.txt -
@fabul
echo The text you want >> %lenomdetontxt.txt
echo The text you want >> %UserProfile%\Desktop\lenomdeetontxt.txt
Thank you very much!
-