Powershell Script to Remove Duplicate File/Folder Versions
$10-50 USD
Paid on delivery
I have a folder with thousands of sub-folders and documents. I need a script (Powershell or Visual Basic - I prefer PS) that I can run that will traverse the files/folders and rename any duplicate named files and/or folders while not changing the file name for the latest version. If you are good at PowerShell, this should be a fairly simple project for you to complete quickly and to get a 5 star rating from me.
If there are duplicate file or directory names (they will always have the literal '_Version_' in their name. Any document or folder that does not have that literal should not be touched for any reason. There script will need to traverse through the entire directory tree (it can have many subfolders).
For instance, here is a sample directory with 6 files.
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
After the PS script is run, notice how the first 3 versions of the file have '_DELETEME' appended to their name while Version 4 (the latest version) file name did not change?
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
\Folder\subFolder\[login to view URL]
The above example shows a folder that has duplicate file names, but the same applies to folder names. (Yes, the file names have a .pdf in their names, that should not affect anything but I wanted to point that out.)
\Folder\subFolder\subFolder2\jdox_ax15326 XYZ [login to view URL]\
\Folder\subFolder\subFolder2\jdox_ax15326 XYZ [login to view URL]\
\Folder\subFolder\subFolder2\jdox_ax15326 XYZ [login to view URL]\
After the script is run, these directories would look like this:
\Folder\subFolder\subFolder2\jdox_ax15326 XYZ Memo_Version_1.pdf_DELETEME\
\Folder\subFolder\subFolder2\jdox_ax15326 XYZ Memo_Version_2.pdf_DELETEME\
\Folder\subFolder\subFolder2\jdox_ax15326 XYZ [login to view URL]\
Notice that '_DELETEME' was appended to the first 2 folder names and the the third (latest) folder name was untouched.
If you have the experience and can do this quickly, please respond. I will send the recipient a sample directory structure to validate that the script works as it should.
Project ID: #24071955
About the project
13 freelancers are bidding on average $48 for this job
Hello, I can help you with your project - Powershell Script to Remove Duplicate File/Folder Versions I have gone through your job posting and become very much interested to work with you. I am an expert in this fiel More
I am good in powershell along with automation and development, please let me know if you are good to award this project to me
Hello there, I am interested in the project. I have expertise in powershell and I am sure I can deliver the script exactly as per your requirement. Thank You.
Hi Client , I have experience on this with PowerShell, I can finish this. I’m a Senior Software Developer & Freelance Web & Automation developer with 5+ years of experiences with Master degree holder and expertise More
Hi, I can write the required script for you with PowerShell to rename old versions of files and folders recursively. I have good experience with scripting in Linux and Windows to perform various tasks like file creatio More
Hi, I use PowerShell scripts in my day to day full time job for documents batch processing. please send me the sample directory if you prefer me. Thanks Venkatesh
I am working with powershell since 2 years and good at powershell and also i had done the same earlier. I will do the same if get the chance.
I can easily do this for you. You need to trust me with this. I am currently working as an automation engineer using primarily powershell script.
Hiiii,, The requirement is interesting and I would to work on this one. I am sure I can make this script in PowerShell, I have already completed this kind or even more complex type of scripts in my office life. I am a More