Powershell Script to check disk space and send email and delete

I have a problem where c: drive files up due to large media files that are saved each night.

I need assistance writing a script file to do the following:

Standard Variables [to be set in script but able to update/edit]

FreeSpaceThreshold: 25%

DeleteThreshold: 15%

TXTLocation: c:\StatusFiles

TXTFileName: [url removed, login to view]

DaysToKeep: 10

FolderOnCDrive: c:\MyBigFilesLocal

FolderOnServer: \\N:\MyBigFilesServer

- check the size c: drive

- check the bytes free

- convert to GB, and percentage (FreeSpace)%

- write these figures to a txt file >> TXTLocation\TXTFileName

(overwrite existing TXTfile)

If FreeSpace% less than DeleteThreshold Then

For Each File in FolderOnCDrive

- If FileModifiedDate IS MORE THAN DaysToKeep old, then

- Write Filename to TXTFileName

- Copy File in "FolderOnCDrive" to location "FolderOnServer"

(note, single file will be ~ 1-4GB)

- Delete this file from "FolderOnCDrive"

- End If

Next File

Send Email with contents of TXTFileName in body.

End If

If FreeSpace% less than FreeSpaceThreshold Then

Send Warning Email with FreeSpace % in subject line .

end if

This file will be loaded on Windows 10 machines, connected to a network.

Task Scheduler will be used to call the script.

Preference for a PowerShell over cmd/bat method.

Open to ideas to improve the above design.

Habilidades: DOS, Shell Script, Visual Basic, Servidor Windows

Veja mais: writing space, writing in script, writing a script, writing a check, single subject design, send email cron job linux script, send email automatically day php script, script check website send email, php script check web page update send email, perl script check disk space linux, bash script send email attachment, php script check gmail email, perl script send email aol, php script send email specific email address, perl send email script database

Acerca do Empregador:
( 14 comentários ) Brisbane, Australia

ID do Projeto: #8593101

Concedido a:


Already have this script implemented in 5 networks need to modify as per your request.

$20 AUD em 1 dia
(0 Comentários)

20 freelancers estão ofertando em média $41 para esse trabalho


Hello, I am interested to do this work. I have related experience doing by a systray WPF C# application. But as you want to run it in windows scheduler, i would prefer to develop a C# console application. Please let m Mais

$80 AUD in 2 dias
(75 Comentários)


$50 AUD em 1 dia
(14 Comentários)

A proposal has not yet been provided

$54 AUD in 3 dias
(27 Comentários)

Hello. More 20 years programming experience. I suggest .net solution. Regards. ---------------------------------------------------------------------------------------------------------------------------------------- Mais

$100 AUD in 3 dias
(11 Comentários)

Hi, I’ve had a good look at your project description and I’m very interested in providing a solution. I have 3+ hands on experience on developing quality web solutions as well as desktop standalone solutions. I u Mais

$49 AUD in 3 dias
(1 Comentário)

A proposal has not yet been provided

$25 AUD em 1 dia
(3 Comentários)

I can complete the project in 1day. I have experience in similar [login to view URL] you are ready to award me the project please doit soon so can complete in this weekend.

$55 AUD em 1 dia
(1 Comentário)

Hello, I am having professional experience in scripting. I can complete this task in 2 days. Just to confirm on which server you are uploading files. What is the size of server. And also do we need to check spac Mais

$40 AUD in 3 dias
(1 Comentário)

Hello My name is AmaI. I am writing this proposal on behalf of skynats technologies pvt ltd. I have read your project description and happy to inform you that I can help you to setup the powershell script . You have Mais

$25 AUD em 1 dia
(0 Comentários)

I created a similar script on my managed servers. Its proved that it's works, I only need an easy modification on it, and it's compatible with Powershell 2 or upper.

$25 AUD em 1 dia
(0 Comentários)

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

$25 AUD in 3 dias
(0 Comentários)

A proposal has not yet been provided

$35 AUD em 1 dia
(0 Comentários)

Hello Sir, I have more than 10 years of experience in Software development. I have been working with .net and other technologies. Your requirements seems to be well defined. Some more things can be done to check fai Mais

$45 AUD in 3 dias
(0 Comentários)

A proposal has not yet been provided

$35 AUD in 2 dias
(0 Comentários)

Professional certificate in Windows Server 2003, 2008 and 2008 R2, specialist on Active Directory and hyper-v, with knowledge on sql server; vMware esx; Amazon AWS and many other tools. I have 17 years experience i Mais

$55 AUD em 1 dia
(0 Comentários)

Non hai ancora fornito una proposta

$15 AUD em 1 dia
(0 Comentários)

Hi, though the rate is a bit low, i can customize my exiating os [login to view URL] fullfill your needs, i already have a ps script that i created fory own co.

$35 AUD in 7 dias
(0 Comentários)

A proposal has not yet been provided

$25 AUD em 1 dia
(0 Comentários)

I am trying to get started here on freelancer. I need the opportunity to do a job and get verified. That is the reason for the bid price. it also looks like a fun project to do. If you can work with me on timing etc I Mais

$20 AUD in 3 dias
(0 Comentários)