Adding / for foder and file seperation

This commit is contained in:
TRBC Developer committed 2024-01-18 16:03:56 +00:00
1 parent 612943e9f8
commit f02850cd2a
1 file changed
+4 -4
+4 -4
View File
@@ -39,13 +39,13 @@ do
#The next Line assigns the number of pages to the value LOCATION to be used for were the file goes
LOCATION=$(pdfinfo "$FILENAME" | grep Pages: | awk '{print $2}')
#Test if the file exists and if it does move it to Temp.pdf to be merged back to its original location.
if test -f $OUTPUTFOLDERStatement-Pages-$LOCATION.pdf
if test -f $OUTPUTFOLDER/Statement-Pages-$LOCATION.pdf
then
mv $OUTPUTFOLDERStatement-Pages-$LOCATION.pdf $OUTPUTFOLDERtemp.pdf
pdfunite "$FILENAME" $OUTPUTFOLDERtemp.pdf $OUTPUTFOLDERStatement-Pages-$LOCATION.pdf
mv $OUTPUTFOLDER/Statement-Pages-$LOCATION.pdf $OUTPUTFOLDER/temp.pdf
pdfunite "$FILENAME" $OUTPUTFOLDER/temp.pdf $OUTPUTFOLDER/Statement-Pages-$LOCATION.pdf
else
#IF the file doesn't exist create the file with the merge.
pdfunite "$FILENAME" $OUTPUTFOLDERStatement-Pages-$LOCATION.pdf
pdfunite "$FILENAME" $OUTPUTFOLDER/Statement-Pages-$LOCATION.pdf
fi
done