If your issue is to find two different file names (but with similar basenames), notice that:
directories and folders are unknown to the C++11 or C++14 standard. Future C++17 standard might provide a filesystem library (but you won't find a mature implementation easily today)
POSIX and Windows has directories (not folders). You could use (notably on Linux or MacOSX) POSIX functions like opendir(3), readdir(3), closedir(3) combined with stat(2) to explore them, or use some higher level library functions like nftw(3).
basename(3) could be useful, but you can use string functions once you know that /
is used as a directory separator.
some framework libraries, notably Qt, POCO, Boost, .... provide useful functions on directories and may give a common abstraction of them usable on several operating systems. Actually I recommend using a framework library, because it is easier and more portable.
The notion of file, of file systems, and of directory is very operating system specific (and some academic OSes don't have them and provide a different notion of persistence). Read Operating Systems: Three Easy Pieces (freely downloadable) for an overview. On Linux and POSIX systems, a file is really some i-node, a directory is a kind of file having entries mapping names to i-nodes, and a file could have several names in various directories (e.g. using link(2)). The C++ standard knows about standard streams, e.g. thru its input/output library.
Copying a file generally means to copy its content (byte by byte) so is not an elementary operation. In practice better copy large blocks of at least 16 kilobytes. Some libraries provide functions to copy files.
On Windows (which I don't know) the notion of file and "folder" is different, and the directory separator is \
. You need to dive into Microsoft documentation. Even Microsoft documentation speaks of directories. But using a framework library would be simpler (and more portable).
BTW, the terminology of folder is generally wrong. You see some folders (not all of them) on your GUI or desktop environment, but the OS (and your program) knows about directories and files.
Sometimes, using some higher-level abstraction than files is useful. For example the SQLite library provides you with some database abstraction, GDBM gives indexed files, and you might consider using some database system like PostGreSQL or MongoDB, etc etc.... YMMV.