Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell script to comprss files with specefic options

$
0
0

We have process that creates lots of text & xml files in a particular folder. The files are then copied to a FTP location and moved to 'Processed' folder. I am looking for a process to archive the processed folder.

Basically the script will accept following input parameters and compress them to a destination ZIP file. Finally, delete the source files once they are compressed.

Example:

$SourcePath = 'C:\Temp\Inputfiles'

$IncludeSubFolders = 'Yes\No'

$TargetCompressFilePath = 'C:\Temp\Target'

$FilesToCompress = '*.txt, *.xml'

$FilesOlderThan = 7

Thanks!


spp


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>