Find Jobs
Hire Freelancers

Powershell Script that finds unpaired files

$15 USD

Imekamilika
Imechapishwa about 5 years ago

$15 USD

Kulipwa wakati wa kufikishwa
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.
Kitambulisho cha mradi: 19210726

Kuhusu mradi

7 mapendekezo
Mradi wa mbali
Inatumika 5 yrs ago

Unatafuta kupata pesa?

Faida za kutoa zabuni kwenye Freelancer

Weka bajeti yako na muda uliopangwa
Pata malipo kwa kazi yako
Eleza pendekezo lako
Ni bure kujiandikisha na kutoa zabuni kwa kazi
Imetolewa kwa:
Picha ya Mtumiaji
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 ndani ya siku 0
0.0 (0 hakiki)
0.0
0.0
7 wafanyakazi huru wana zabuni kwa wastani $28 USD kwa kazi hii
Picha ya Mtumiaji
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 ndani ya siku 2
5.0 (20 hakiki)
4.7
4.7
Picha ya Mtumiaji
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 ndani ya siku 1
5.0 (3 hakiki)
2.7
2.7
Picha ya Mtumiaji
Hey there, I'm a System Engineer with coding skills. I had developed tons of scripts using PowerShell. I can help. Regards.
$35 USD ndani ya siku 1
5.0 (5 hakiki)
2.5
2.5
Picha ya Mtumiaji
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 ndani ya siku 10
5.0 (4 hakiki)
1.8
1.8
Picha ya Mtumiaji
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 ndani ya siku 1
0.0 (0 hakiki)
0.0
0.0
Picha ya Mtumiaji
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 ndani ya siku 1
0.0 (0 hakiki)
0.0
0.0

Kuhusu mteja

Bedera ya UNITED STATES
Kingwood, United States
5.0
6
Njia ya malipo imethibitishwa
Mwanachama tangu Jul 21, 2018

Uthibitishaji wa Mteja

Asante! Tumekutumia kiungo cha kudai mkopo wako bila malipo kwa barua pepe.
Hitilafu fulani imetokea wakati wa kutuma barua pepe yako. Tafadhali jaribu tena.
Watumiaji Waliosajiliwa Jumla ya Kazi Zilizochapishwa
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Onyesho la kukagua linapakia
Ruhusa imetolewa kwa Uwekaji wa Kijiografia.
Muda wako wa kuingia umeisha na umetoka nje. Tafadhali ingia tena.