import shutil
import os
import time
def do():
filename = 'GameUserSettings.ini'
username = os.getenv('USERNAME')
#dir = 'C:\\Users\\' + username + '\\AppData\\Local\\'
dir = 'C:\\Users\\' + username + '\\AppData\\Local\\TslGame\\Saved\\Config\\WindowsNoEditor\\'
shutil.copy2('aaa.txt', dir + filename)
#Copy default setting values
print("If the application is not completed and turned off, it is not applied.")
time.sleep(1)
do()
print ("Applied")
time.sleep(1)
When enabled, GameUserSettings for a specific path.I'd like to make a program called ini The data value of the file is stored in aaa.txt.
That is to operate normally in quite the same when we make piedirectory. I'd like to use a computer and create files to exe pyinstaller aaa gesseoseo ... don't know how to merge with a file, txt I have a question.
When I searched about pyinstaller, they told me to use add-data.
pyinstaller -F --add-data="aaa.txt;data_files" file.py
If you run it on the terminal like this, it says success, but if you run the exe file, it says an error that aaa.txt is missing. ㅠ<
pyinstaller exe txt shutil
There's a kind example code in the stack overflow.
© 2025 OneMinuteCode. All rights reserved.