7/27/2023 0 Comments Batch convert nef to jpg lightroomThat required a bit different handling of the find command. It did not like my directory names, which contain spaces. I like the bash script for OS X (by T.Toivonen), but I have noticed there are a few issues. Print "%s: %s = %s => %s" % (path, base_name, jpg, waste_dir) New_jpg = waste_dir jpg_base_name_with_ext Jpg_base_name_with_ext = base_name jpg_extension # find pairs and move jpgs of pairs to waste basket Jpg_ext = (jpg_extension.lower(), jpg_extension.upper())įor path, dirs, files in os.walk(os.path.abspath(root)):īase_name = os.path.splitext(base_name) Raw_ext = tuple(map(str.lower,raw_extensions)) tuple(map(str.upper,raw_extensions)) '''Locate files in directory with given extensions''' Waste_dir = "/Users/marvin/Pictures/waste/" # Windows : waste_dir = "C:\path\to\waste\" # multiple raw extensions allowed, single jpg extension only # define your file extensions here, case is ignored. # For each pair found the JPG is moved to a # Description: This script looks in all sub directories for remove jpg only if the pairs are in the same folder (avoid accidental removal of a jpg named like a raw file in an other folder).Here is a modified version of Tomy's Python script. Differences:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |