linux – cp command from a sub folder I know

I want to use the cp command in a bash script I am writing to copy the contents of a directory into another created directory.

From my under standing the cp command needs the entire path to find where the file is stored


cp ~/home/Documents/Folder1/file.txt ~/home/NewDirectory/

However, if this bash script with the cp command in it is run on multiple computers the path will never be the same.

The only info I know is the folder the bash script is stored in and the sub directories to be copied. Bellow is an example of the directory structure

– Dir2
– Dir3

So for example I want to cp file1.txt from Dir2 into Dir 3 with the bash script being in the parent Dir1