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]
|
return directory_name.rsplit("[", 1)[0]
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) < 2:
|
||||||
print("Usage: python script.py <folder_path>")
|
print("Usage: python script.py <folder_path>")
|
||||||
sys.exit(1)
|
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)
|
suffix = count_folder_files(directory_name)
|
||||||
# If [num] already exists at the end of the string, remove it so we can update it
|
# 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)
|
directory_name_cleaned = clean_directory_name(directory_name)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user