Add suffix to copied file and folder

This generalized function will work with any string you feed it

Math warehouse offers free web space for anyone who wants to create a math-related web site, whether the site is about science, math or computer science; and while creating a contentment management system for this free web space, I needed a php function that would create duplicate copies of string names. One of the many features this free web space offers is the ability to manage your web pages and one common function that I wanted to include was the ability to duplicate a file name and append a "-copy[number]" to each file or folder so that anyone who used math warehouse's web site for their own personal web site could easily backup important files and folders as many times as you want! (While this is not the most sophisticated function, it's generalized nature makes it ideal for anyone who needs to imitate the typical functionality of renaming files or folders whether you are doing something like math warehouse's offer of free web space and file management or your own custom duplication function. )
Try it for yourself-Either enter a file name or a something with -Copy[make up a number] or use the randomly generated name below, press the "generate copy" button and watch the function in action.
:
press button to implement function

<?php
//Note if you feed this function a file or folder name it must be the basename
function generateCopyStringName($originalBaseName)
{ }
?>
Example of usage