Note: Upgraded to Python 3 in 02/2019. The Python 2.x version can be downloaded here
Scripts for moving files and renaming directories
Based on the file path entered, moves any file existing below the eighth level folder in a Linux directory structure (i.e. /media/bitCurator/Storage/Collection/IncomingTransfer/BatchNumber/Disc/JobName) up to the eigth level folder. The script writes a log of all files that were moved, including their old location and their new location.
Based on the primary and secondary file paths entered, produces two CSV files that list the files that exist in one directory but are missing from other directory.
Using the rename log created by renameFilesInMutipleDirectories.py, this script checks the new file paths were successfully created. It also finds any file paths in the directory that differ from the new file names in the rename log.
Based on the file path entered and file extension specified, extracts the names of all relevant files and folders in the directory and writes them to a CSV file.
Based on the file path entered and file extension specified, extracts the names of all relevant files in the directory and writes them to a CSV file. Additionally, you can specify a prefix to be added to the edited file name in the "newFile" column. Additionally, this script creates a log of all files, whether they have the specified extension or not, in the directory for troubleshooting potential problems.
Based on the file path entered, extracts the names of all nested folders and writes them to a CSV file.
Based on the file path entered, creates a checksum.md5 file containing the names of all files in that directory and the files' MD5 checksums.
Based on the file path entered, renames all nested folders according to a CSV file named 'FolderNames.csv' with the columns named 'oldFolder' and 'newFolder,' provided that there is a match between the nested folders and the names in the 'oldFolder' column. The script writes a log of all folders that were renamed, including their old name and their new name.
Based on the file path entered, renames files in the directory according to a specified CSV file with the columns named 'file' and 'newFile,' provided that there is a match between the files and the names in the 'file' column. The script writes a log of all files that were renamed, including their old name and their new name. The user will be prompted as to whether they want the file name changes executed or whether they just want log of the expected file name changes.
Based on the directory entered, renames files across multiple folders according the CSV file created by extractFileAndFolderNamesInDirectory.py. Will not rename a file if the new file name already exists (ensures no file is overwritten). Renames files by matching them to current file path and old file name in the CSV, changing it to the name specified in column 'newFileName.' The user will be prompted as to whether they want the file name changes executed or whether they just want log of the expected file name changes. Made with the help of Tim DiLauro.
Based on the file path entered, selects every 10th file of a folder (after skipping the first file) and moves it over identically named folder in a 'sampled' directory while the skipped files are moved into an identically named folder in an 'unsampled' directory. The script also writes 'sampled' log of all sampled files that were moved, including their old location and their new location.