Find Jobs
Hire Freelancers

Powershell Script that finds unpaired files

$15 USD

Terminado
Publicado hace alrededor de 5 años

$15 USD

Pagado a la entrega
I need a Powershell script that scans a folder, and for each ' .BP' file in the folder, checks whether there is a file with the same name, but ending in '[login to view URL]'. Example: A file exists in this folder with the following name: 20190307_1343 - [login to view URL] Check whether a file with the name '20190307_1343 - [login to view URL]' exists. For each .BP file found in this folder for which there is not also another file with the same name but ending in '[login to view URL]', the filenames should be collected, and stored in a variable in XML format. The XML should look like: <UnpairedFileList> <File><Name>20190307_1343 - [login to view URL]</Name></File> ......... </UnpairedFileList> The XML variable's contents should be written to a file path. The file path should be sent to this powershell script via a COMMANDLINE argument. Another app will be running this powershell script and sending the file path for where the results should be saved.
ID del proyecto: 19210726

Información sobre el proyecto

7 propuestas
Proyecto remoto
Activo hace 5 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hi, Here is the script: # param ( [Parameter(Mandatory=$true)][string]$InFolderPath, [Parameter(Mandatory=$true)][string]$XMLFilePath ) $InFolderPath = $InFolderPath + "\*" #Array of [login to view URL] $RollBackFiles = Get-ChildItem -Path $InFolderPath -Include "*[login to view URL]" |%{ $[login to view URL] -replace "_rollback", ""} #Array of base .bp $BPFiles = Get-ChildItem -Path $InFolderPath -Include "*.bp" -Exclude "*[login to view URL]" |%{ $[login to view URL]} #Create XML Doc [xml]$XMLDoc = New-Object [login to view URL] #Add Declaration to the XML Doc $Declaration = $[login to view URL]("1.0","UTF-8",$null) $[login to view URL]($Declaration) |Out-Null #Add Root Node to the XML Doc (UnpairedFileList) $UnpairedListRoot = $[login to view URL]("element","UnpairedFileList",$null) #Add File and Name nodes foreach unpaired base file foreach ($file in $BPFiles | where {$_ -notin $RollBackFiles}) { #Create File node $FileNode = $[login to view URL]("element","File",$null) #Create Name element and set its value to the file $NameNode = $[login to view URL]("Name") $[login to view URL] = $file +".bp" #Add Name as child to the File $[login to view URL]($NameNode) | Out-Null #Add File as child to the Root $[login to view URL]($FileNode) | Out-Null } #Add Root to the XML Document $[login to view URL]($UnpairedListRoot) | Out-Null #Save $[login to view URL]($XMLFilePath) #to call it: [login to view URL] -noexit -file "C:\[login to view URL]" "C:\Inputs" "C:\[login to view URL]" Hope it helps Regards Marcin
$15 USD en 0 día
0,0 (0 comentarios)
0,0
0,0
7 freelancers están ofertando un promedio de $28 USD por este trabajo
Avatar del usuario
Hi, I have over five years experience automating tasks with powershell, I can do this job. Please see my work history for relevant feedback.
$35 USD en 2 días
5,0 (20 comentarios)
4,7
4,7
Avatar del usuario
Hey, I'm Romain, a french Microsoft certified guy (MCSA and MSCE) I can do this script for you please contact me for informations. Best regards, Romain
$30 USD en 1 día
5,0 (3 comentarios)
2,7
2,7
Avatar del usuario
Hey there, I'm a System Engineer with coding skills. I had developed tons of scripts using PowerShell. I can help. Regards.
$35 USD en 1 día
5,0 (5 comentarios)
2,5
2,5
Avatar del usuario
I could pair the BP files for you with powershell :) I'm doing this kind of work on a daily basis for my job and I can complete this task. the only thing I need to know is when you need it done.
$20 USD en 10 días
5,0 (4 comentarios)
1,8
1,8
Avatar del usuario
Hello, my name is Kabir Lovero, and I have 5+ years of experience of working as a Support Engineer, and programmer. Powershell is my scripting language of choice, and I've completed various projects relatedd to this. Such as looking through log files for specific tags, and performed actions accordingly, sorting files and checked system data and triggered functions, also encryption of data and various others. I believe that i will be able to write the code for you in about 4 days, so that enough testing will be done to give you a complete product. Let's discuss this further best regards
$35 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Hello I have 5 years of development and automating experience and have worked on multiple automation projects for public cloud services provider I can deliver your project as per your requirements lets start chat to discuss this
$25 USD en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
Kingwood, United States
5,0
6
Forma de pago verificada
Miembro desde jul 21, 2018

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.