Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Simple ? on how to construct an output file with current date in it

$
0
0

Afternoon,

 

I have a ps script I just crafted that will recursively delete BAK files from a parent and child folders of said parent.

 

Works like a champ.

 

I cannot seem to get the easy part of outputting the files that are deleted into a folder (let’s say on the root of C:\ ) that has the current timestamp when the processes of purging began.

 

Final look of the file would be similar to this (saying the purge script executed at 1:30a in the morning).

 

    PurgedBAKFilesOn_130808_013000.log

 

Any help is greatly appreciated!

 


Viewing all articles
Browse latest Browse all 8411

Trending Articles