Files
eoy-pdf-sortandmerge/Removing_Files.sh
T
nmemmert 144adf64c4 Complete PDF Sort and Merge Flask Application
- Full-featured web application for PDF processing
- Microsoft Entra (Azure AD) authentication with PKCE
- Parallel PDF sorting and merging capabilities
- Job management system with real-time progress tracking
- Modern web UI with responsive design
- Comprehensive error handling and logging
- Ubuntu installation script for easy deployment
- Environment configuration for secure credential management
2025-11-05 11:41:48 -05:00

69 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
#Get the folder with the pdf documents in it.
while :
do
echo -e "What is the directory with the pdfs?"
#read PDFDIR
PDFDIR="/home/btmccrea/Downloads/pdfs"
if [ -d $PDFDIR ]
then
break
else
echo -e "Directory not found."
fi
done
#Get the folder for the output file.
while :
do
echo -e "What is the output directory for the pdf's with missing addresses?"
#read OUTPUTFOLDER
OUTPUTFOLDER="/home/btmccrea/Downloads/output/Final"
if [ -d $OUTPUTFOLDER ]
then
break
else
echo -e "Directory not found."
fi
done
#Get the folder with the csv
while :
do
echo -e "What path and file with?"
#read CSVFILE
if [ -f $CSVFILE ]
then
break
else
echo -e "File not found."
fi
done
#import list from csv
echo "Processing csv."
while IFS=$'\t' read -r FILE
do
echo "FILE $FILE"
# echo "user $USER"
# echo "match $MATCH"
# echo "${array[0]}"
# if [[ "$MATCH" == "Match-Mailable" ]]
# then
#
# echo -e "Processing file $FILE"lY
cp $PDFDIR/"$FILE" $OUTPUTFOLDER
# else
# echo "no match"
# fi
done < /home/btmccrea/Downloads/Smarty_Streets.csv
#FILE=$(cat /home/btmccrea/Downloads/Smarty_Streets.csv)
#echo $FILE
#IFS=$'\t'
#for f in Smarty_Streets.csv
#do
# echo "doing file $f"
# cp $PDFDIR/"$f" $OUTPUTFOLDER
#done
#cd to and then remove files