Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

[Help] Script that recursively emails files in a folder one by one, then moves those files

$
0
0

Here’s the goal:

I’ve got SCCM creating several reports a week, that are being placed into a common drive folder. I would like to have a PowerShell script that will take each file in the folder, email it, move it to another folder, then perform it again.

Essentially:

See file 1

email file 1

move file 1

check

see file 2

email file 2

move file 2

check

Like that. Any tips for this? It’s a bit outside the current knowledge I have. I can send a basic email from PowerShell, and I know how to move files, but piecing it all together is tough for me.

submitted by /u/FubsyGamr
[link] [comments]

The post [Help] Script that recursively emails files in a folder one by one, then moves those files appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793