Tamamlanmış

Power Shell script - small adjustment - maybe 20 lines

I have an existing simple Power Shell script (yes, it actually is simple! I'm not just saying that!)

I need it adapted slightly so that...

1. it loads a file using a filename that has already been passed to the script (filename is stored as a variable - already exists and works perfectly).

2. copy that file to a folder

3. a completely different script gets activated when a new file appears in that folder - this other script does some search and replace, which takes up to 15 seconds to complete. Then it saves the file as a NEW filename.

4. Ping the folder every 1 second until the NEW filename appears.

5. submit that filename to [url removed, login to view] using a command line. ([url removed, login to view] is already installed on the server).

I figure it will take somewhere between 10 and 20 lines of code.

AUD $40 would work good for me as a price.

====

Here is part of the script (there's a few lines before it setting up variables, could not include it here due to character limit on the job description).

Function RenderMessage($Message)

{

try {

# Grab contents of message body

$messageJson = $[url removed, login to view]($[url removed, login to view])

# Get Job id

$JobId = $[url removed, login to view]

# Find out where our template is, copy locally and extract

$TemplateName = $[url removed, login to view]

$S3TemplateFilePath = $S3TemplateFolder + "\" + $TemplateName + ".zip"

$OutputTemplateFilePath = $LocalTemplateFolder + "\" + $TemplateName + ".zip"

Read-S3Object -bucketname $bucketname -key $S3TemplateFilePath -file $OutputTemplateFilePath

$shell_app=new-object -com [url removed, login to view]

$zip_file = $[url removed, login to view]($OutputTemplateFilePath)

$destination = $[url removed, login to view]($LocalTemplateFolder)

$[url removed, login to view]($[url removed, login to view](), 0x14)

del $OutputTemplateFilePath

# Work out arguments

$OutputPath = $LocalOutputFolder + "\" + $[url removed, login to view]

$projectfilearg = $LocalTemplateFolder + "\" + $TemplateName + ".aep"

$outputfilearg = $OutputPath

$compositionarg = $[url removed, login to view]

# $omtemplatearg = $[url removed, login to view]

# YOUR EDITS HERE

# Render video file

aerender -project $projectfilearg -output $outputfilearg -comp $compositionarg > "$LocalOutputFolder\$[url removed, login to view]"

Log Information "RenderComplete $JobId"

$S3Destination = $S3OutputFolder + "\" + $[url removed, login to view]

Write-S3Object -bucketname $bucketname -key $S3Destination -file $OutputPath

----------------

I need to

1. take the input from earlier in the script (filename, path, text message, all contained in JSON),

2. copy the filename to a new folder,

3. wait for another script to load and do some search and replace (takes about 30 sec, handled by another script that pings the folders looking for new files), and save as a new template file.

4. Your script pings the folder every 2 seconds, looking for the new saved file.

5. Submit the new file as the filename on line 54 (where it says # Run program here

aerender -project $projectfilearg -output $outputfilearg -comp $compositionarg > "$LocalOutputFolder\$[url removed, login to view]" )

-----

Beceriler: .NET, Windows Sunucu

Daha fazlasını gör: template power, power up program, power up 2, power program in c, power part 2, on-line job search, find job on line, 30 second script, m job net com, video ser, shell script, json script, i need to load json, character figure, server load log, copy windows command line, text comp, windows log script, read write server using, write json file server

İşveren Hakkında:
( 102 değerlendirme ) North Ward, Australia

Proje NO: #6652332

Seçilen:

adaml84

Hi, I have strong programming experience in Powershell, so I'm interested to work on this script. ps. .NET framework has a class that can be used for directory monitoring. It's called FileSystemWatcher. With th Daha Fazla

%selectedBids___i_period_sub_7% gün içinde 40%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(3 Değerlendirme)
2.0

Bu iş için 5 freelancer ortalamada $39 teklif veriyor

murtaza1981

Hi, An ASP.NET,c#,vb ,SqlServer,JQuery,Javascript expert here. Please feel free to discuss the project with me. Thanks, Murtaza

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(8 Değerlendirme)
4.3
TAHKuCT

Предложение еще не подано

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(2 Değerlendirme)
2.3
alimirza2075

A proposal has not yet been provided

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(0 Değerlendirme)
0.0
justins1

Hello! *** Please consider me as a top candidate for your project. *** I have written many large scale Microsoft PowerShell scripts. I have experience with Active Directory, IIS, and Exchange to complement PowerS Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(0 Değerlendirme)
0.0