I want to move files from my source directory to target directory, and want to make sure that user is moving from designated directory, like from /dev/prj1 of source to /dev/prj1 of target.
How can I get last 2 directories /dev/prj1, considering directory path length may change. I want to start from back and grab last two. I want then to match last two dir pattern with target and if matching, then copy otherwise fail. Here is more info
I have source directory path as
src_path=/corp/thost/usr/deploy/dev/prj1
and my target path is as follows
tgt_path=/corp/thost/proj/prod/dev/prj1
And last two directories /dev/prj1 are changing for departments, and
How can I get last 2 directories /dev/prj1, considering directory path length may change. I want to start from back and grab last two. I want then to match last two dir pattern with target and if matching, then copy otherwise fail. Here is more info
I have source directory path as
src_path=/corp/thost/usr/deploy/dev/prj1
and my target path is as follows
tgt_path=/corp/thost/proj/prod/dev/prj1
And last two directories /dev/prj1 are changing for departments, and