Script that generates commands and run them
Posted: 01 May 2020 03:25
Hello
Summay of my question:
I want to generate commands and run them based on the files I find in the current folder and subfolders; the selection of the files need to be based on their extension.
Example:
On
D:\Folder 1
D:\Folder 1\SubFolder
D:\Folder 1\SubFolder\SubSubFolder
I have lots of files. I want to run a script on "D:\Folder 1" and based on that script, I want to select all files with the extension *.p7s and *.p7m from the root folder and subfolders. And based on the selected files, I want to run this command:
Summay of my question:
I want to generate commands and run them based on the files I find in the current folder and subfolders; the selection of the files need to be based on their extension.
Example:
On
D:\Folder 1
D:\Folder 1\SubFolder
D:\Folder 1\SubFolder\SubSubFolder
I have lots of files. I want to run a script on "D:\Folder 1" and based on that script, I want to select all files with the extension *.p7s and *.p7m from the root folder and subfolders. And based on the selected files, I want to run this command:
- openssl smime -inform DER -verify -noverify -in pathOfFileSelected -out pathOfFileSelectedWithoutTheExtension
- openssl smime -inform DER -verify -noverify -in "D:\Folder 1\doc.pdf.p7s" -out "D:\Folder 1\doc.pdf"