TLDR: I need an infinite loop under the ( testing_files.py. ) cleanup_directory() function and currently the code works like this:
it declares some variables, creates a variable called old_files (that is the data from os.listdir) gets turned into a tuple so that it can hopefully
be referenced against if a new file gets added into said directory.
If someone sees this don't feel obligated to help, really. it might be better if you dont. I'm probably gonna solve this
tommorow which might teach me a thing or two, so...... maybe some tips
im going to bed for the night, and if someone sees this and cares to help me with a problem that would be appreciated.
the problem I'm having is under testing_files.py.
I'm trying to create an infinite loop that will rename all files to a specific name with a number at the end.
There's a main problem and a little side issue
problem 1. the loop doesn't seem to be working. it will rename the files but won't detect when new files are added.
problem 2. When going to rename the file, it would be ideal to keep...I don't remember. I checked the code and don't remember the problem.
I noticed that this repo had been cloned a few time and I don't know who would want that...maybe they were looking for an actual game...sorry
anyways.
sorry there are so many comments, those were past thougths that probabllye never got flesed out or were just paused so that I
could test run.
I need to write these things down my head is so cloudy.
i have a few more ideas that might work or maybe it will come to me in a dream....
print("passed first if statement")
os.rename(src, dst)
if file in old_rename:
print("passed second if statement")
pass
elif file not in old_files:
os.rename(src, dst)
else:
os.listdir(file_directory)
timecount += 1
if timecount >= 3:
time.sleep(5)
print("sleeping")
#while new_file_check == False:
# if file
# if num_of_old_files