

# Answering "NO" this only prints the files "TO BE Moved" Movingfileto = path.normpath(str(target_foldr) + '/' + # forward slash required for both to split # using path.normpath as i found an issue with double //įiletomove = path.normpath(str(root) + '/' + If (file.endswith(tuple(includes_file_extensn))): # showcase only the file types looking for If (not (str(root) + '/').startswith(tuple(exclude_foldr))): # creating a directory to str and excluding folders that start with # "Root" had all info i needed to filter folders not dir.įor root, dir, files in walk(search_dir, topdown=True): If nfirm("Would you like to move files?", Target_foldr = path.dirname('/Users/' + mac_username + '/Pictures/Archive/') Search_dir = path.dirname('/Users/' + mac_username + '/Documents/') """THE MODULE HAS BEEN BUILD FOR KEEPING YOUR FILES ORGANIZED."""
#FREE ARCHIVER FOR MAC OS X SIERRA MAC OSX#
# Created On : MAC OSX High Sierra 10.13.6 (17G65) HINT: Read the script below as I added info per line as to what I had done. This is only a snippet of my GitHub Please visit for the total script. NOTE: the Prompt is only one time per run and is NOT per fileīy Default the prompt defaults to NO when you hit enter instead of, and will just list the Potential files to be moved. I can Search any folder by path, locate & move specific file.types, ignore subfolders and i preemptively prompt the user if they want to move the files. My goal for this was to keep my mac organized. This gave me the exact result I was looking for. Which compiled a path and excluded the tuple of my listed folders. If (not (str(root) + '/').startswith(tuple(exclude_foldr))) So, This is what I came up with an expansion of my original answer to another question.
