Now works with multiple files as arguments
This commit is contained in:
parent
545279d6c6
commit
79351568a7
|
|
@ -45,11 +45,13 @@ def clean_directory_name(directory_name):
|
|||
return directory_name.rsplit("[", 1)[0]
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python script.py <folder_path>")
|
||||
sys.exit(1)
|
||||
|
||||
directory_name = sys.argv[1]
|
||||
args = sys.argv[1:]
|
||||
for arg in args:
|
||||
directory_name = arg
|
||||
suffix = count_folder_files(directory_name)
|
||||
# If [num] already exists at the end of the string, remove it so we can update it
|
||||
directory_name_cleaned = clean_directory_name(directory_name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user