Find Jobs
Hire Freelancers

Convert PowerShell to C##

$10-30 CAD

Completed
Posted almost 10 years ago

$10-30 CAD

Paid on delivery
I have a 60 line PowerShell script that I need converted into C#. You just need to write the code and test it. I will paste the PowerShell code here so you can see exactly what needs to be done. The script performs the following: 1) Looks for all files in a folder called "inbox" (this is just a folder on C:\Inbox) 2) For each file, replace spaces in the name with underscores, move the file to C:\Stage, then launch a powershell process 3) Logs its actions to a CSV file ------------------------------------------------ ## DEFINE FUNCTIONS function fcnLogEvent($strEventDescription,$strEventLevel) { $strDateTime = Get-Date -Format "MM/dd/yyyy hh:mm:ss:ffff" $strEventDescription = $strEventDescription + " " $strEventDescription = $[login to view URL](85,".") $strLogLine = $strDateTime + "," + $strEventDescription + " " + $strEventLevel try { if ($debugLevel -eq "1") { write-host $strLogLine add-content ".\[login to view URL]" -value $strLogLine } } catch { } } function fcnMoveFileToStage($strFile) { $strFileName = $[login to view URL] try { Move-Item "..\inbox\$strFileName" "..\stage\$strFileName" fcnLogEvent "Moving File $strFileName" "Information" } catch { fcnLogEvent "Moving File $strFileName" "Error" } return $strFileName } function fcnLaunchFileEscort($strFileName) { try { $strExecutable = "[login to view URL]" $strArguments = "-file .\[login to view URL]", "$strFileName" $objProcess = start-process $strExecutable $strArguments -PassThru -WindowStyle Hidden fcnLogEvent "Starting file escort for $strFileName" "Information" } catch { fcnLogEvent "Starting file escort for $strFileName" "Error" } } ## SCRIPT START fcnLogEvent "Scanning inbox" "Information" ## RENAME SPACES TO UNDERSCORES IN FILE NAMES dir "..\inbox" | Rename-Item -NewName { $[login to view URL] -replace ' ','_' } ## GET FILES IN INBOX try { $arrFiles = Get-ChildItem -Path "..\inbox" –File } catch { fcnLogEvent "Unable to scan inbox" "Error" } ## PROCESS EACH FILE if ($[login to view URL] -gt 0) { $intFileCount = $[login to view URL] fcnLogEvent "Found $intFileCount files in inbox" "Information" foreach ($objFile in $arrFiles) { $strStageFileName = fcnMoveFileToStage $objFile fcnLaunchFileEscort $strStageFileName } } else { fcnLogEvent "Found 0 files in inbox" "Information" } ## EXIT fcnLogEvent "Process complete. Exiting" "Information"
Project ID: 6255529

About the project

13 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I can complete this in a couple of hours. Will you be needing any visual feedback or you're planning to run this with the scheduler?
$20 CAD in 1 day
5.0 (6 reviews)
4.0
4.0
13 freelancers are bidding on average $26 CAD for this job
User Avatar
A proposal has not yet been provided
$25 CAD in 2 days
4.9 (215 reviews)
6.0
6.0
User Avatar
A proposal has not yet been provided
$34 CAD in 1 day
4.9 (10 reviews)
4.7
4.7
User Avatar
Hi, I think I can do it:-)! I have a lot of experience in C# and VB.NET development. Best regards:-)
$30 CAD in 1 day
5.0 (17 reviews)
4.3
4.3
User Avatar
7 years in C# development i'll do now if you hire me and send it in some hours Please contact me soon
$30 CAD in 1 day
4.9 (6 reviews)
3.5
3.5
User Avatar
A proposal has not yet been provided
$20 CAD in 1 day
5.0 (4 reviews)
3.2
3.2
User Avatar
I can write C# code for mentioned 3 steps. I would like to work on your project. Thanks . . . .
$17 CAD in 1 day
5.0 (3 reviews)
1.5
1.5
User Avatar
I am Hemal Patel, B.E. Computer Engineer, having 4 years of experience on Microsoft technologies for developing software for different domains. Since 2010, I have served as a software engineer for my previous company, where I have been repeatedly recognized for developing innovative solutions for multimillion-dollar, globally deployed software and systems. I am responsible for full lifecycle development of next-generation software, from initial requirement gathering to design, coding, testing, documentation and implementation. Known for excellent client-facing skills, I have participated in proposals and presentations that have landed six-figure contracts. I also excel in merging business and user needs into high-quality, cost-effective design solutions while keeping within budgetary constraints. My technical expertise includes cross-platform proficiency (Windows & Web using .Net); fluency in 13 scripting/programming languages (including C, C++, VB, C#, PHP, javascript, jquery, SQL and MySQL); and advanced knowledge of developer applications, tools, methodologies and best practices (including OOD, client/server architecture and self-test automation).
$30 CAD in 1 day
5.0 (2 reviews)
0.5
0.5
User Avatar
A proposal has not yet been provided
$25 CAD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CANADA
Burnaby, Canada
5.0
2
Payment method verified
Member since Jul 30, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.