From f02850cd2a16e72341c59873de617e9e66ec3116 Mon Sep 17 00:00:00 2001 From: TRBC Developer <5380239-trbcdev@users.noreply.gitlab.com> Date: Thu, 18 Jan 2024 16:03:56 +0000 Subject: [PATCH] Adding / for foder and file seperation --- Sort_and_Merge_Files.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sort_and_Merge_Files.sh b/Sort_and_Merge_Files.sh index b490083..848a14f 100755 --- a/Sort_and_Merge_Files.sh +++ b/Sort_and_Merge_Files.sh @@ -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