Færdiggjort

Powershell Script to Remove Duplicate File/Folder Versions

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.

Evner: Powershell, Visual Basic

Se mere: shell script remove single line file, php script list file folder, remove duplicate words script, shell script will remove record file, script remove duplicate email, powershell script add users excel file, shell script remove extra line feed file, shell script remove select file, linux script remove file, remove rows file shell script, shell script remove line file, script remove line file, powershell script read excel file, linux shell script remove lines file, shell script remove part file, linux script remove line file perl, remove duplicate file php, run powershell script from batch file with parameters

Om arbejdsgiveren:
( 20 bedømmelser ) Granville, United States

Projekt ID: #24071955

Tildelt til:

kostiapl

Hi. You described your task very cleverly, thanks. At first it seems that simple Get-ChildItem with -Recurse parameter is exactly what is needed but renaming directories adding a little nuance in my opinion (if we chan Flere

$50 USD in 7 dage
(6 bedømmelser)
3.0

13 freelancere byder i gennemsnit $48 på dette job

schoudhary1553

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 Flere

$120 USD in 3 dage
(172 bedømmelser)
7.6
goodwork20k

I am good in powershell along with automation and development, please let me know if you are good to award this project to me

$50 USD in 3 dage
(34 bedømmelser)
5.3
DebasisB

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.

$50 USD på 1 dag
(35 bedømmelser)
5.6
AdrianCJ

I can do it in PowerShell. I use it on a daily basis to manipulate files/registry/AD Users and this sounds like a pretty straightforward project. I will need a directory+file sample for testing purposes and let me know Flere

$40 USD in 2 dage
(6 bedømmelser)
3.2
krishsathish02

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 Flere

$14 USD på 1 dag
(1 bedømmelse)
0.4
umarhussain15

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 Flere

$50 USD in 2 dage
(0 bedømmelser)
0.0
chinna542

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

$50 USD in 2 dage
(0 bedømmelser)
0.0
Bhopalmacro

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.

$49 USD in 3 dage
(0 bedømmelser)
0.0
itzirfanofficial

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.

$15 USD på 1 dag
(0 bedømmelser)
0.0
mariohanske

Windows Expert to deploy/configure Windows 10 Relevant Skills and Experience PowerShell

$35 USD in 10 dage
(0 bedømmelser)
0.0
ksp506

I have 5 + years experience in Powershell scripting in various activities like older files, size based documents, type of doc , based on Author and date modified, duplicate files removing or move them to different pl Flere

$66 USD in 3 dage
(0 bedømmelser)
0.0
Abhigrover

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 Flere

$35 USD in 4 dage
(0 bedømmelser)
0.0