Trouble seeing the images? Right click on images and open in new tab to enlarge or zoom in on the page (Ctrl + mousewheel).
The post processing component of VDM allows direct communication between you and the operating system or application, providing an environment to automate IT operations.
Why Send Post Processing Commands?
Post Processing commands are useful for performing certain operations post run time using the scheduler. This can involve moving, deleting, copying files and more.
Where Can You Send Post Processing Commands?
You can modify the post processing commands for a Job in the Job section of the Scheduler for VDM. This can be done using the Add/Edit Wizard or the property window on the right side of the Job creation.
Video Tutorial:
Steps to Enable Post Processing
Below are the steps to enable post processing in the scheduler as well as usage examples.
1. Enable Command Post Processing
2. Enter the post processing commands (*Note you can right click to bring up selection of file names*)
Right Click Menu:
Command Post Processing Examples
Note: If a file name or directory contains a space the entire file name or path must be between quotes. It is also recommended to have scripts be called in a single line.
Example 1: Calling a .bat file to run in VDM
"C:\temp\PS Scripts\YourFile.bat"
Copy - For more examples click here.
Note: The examples below use the PDF export type - this may need to be adjusted for your specific use case.
Example 1: Copy the file to new location
To copy a specific file to a new location.
copy MonthBatchDetail.pdf C:\Users\cfifield\Desktop\ExtraReports
Example 2: Copy the file to new location with a new name
To copy a specific file to a new location with a new name.
copy MonthBatchDetail.pdf C:\Users\cfifield\Desktop\ExtraReports\NewMonthBatch.pdf
Example 3: Copy the file with spaces in the name to a new location
To copy a specific file that contains spaces in the name to a new location. (the quotes in the command are only important when the file name or folder contains spaces.)
copy "Month Batch Detail.pdf" "C:\Users\cfifield\Desktop\Extra Reports"
Example 4: Copy the file with spaces in the name to new location that also has spaces in the name
To copy a specific file that contains spaces in the name to a new location that contains spaces in the name. (the quotes in the command are only important when the file name or folder contains spaces.)
copy "Month Batch Detail.pdf" "C:\Users\cfifield\Desktop\Extra Reports"
Example 5: Copy multiple files to new location
To copy a specific file that contains spaces in the name to a new location
copy MonthBatchDetail.pdf, MonthBatchSummary.pdf C:\Users\cfifield\Desktop\ExtraReports
Example 6: File Name using Right Click Menu (Full Name)
To copy a file using the right click menu to select the file name to a new location.
copy Details.PDF.FullName C:\Users\cfifield\Desktop\ExtraReports
Example 7: Space in File Name using Right Click Menu (Full Name)
To copy a file using the right click menu to select the file name that contains a space in the name to a new location. (the quotes in the command are only important when the file name or folder contains spaces.)
copy "Details.PDF.FullName" C:\Users\cfifield\Desktop\ExtraReports
Example 8: Space in File Name and location using Right Click Menu (Full Name)
To copy a file using the right click menu to select the file name to a new location that contains spaces in the name. (the quotes in the command are only important when the file name or folder contains spaces.)
copy "Details.PDF.FullName" "C:\Users\cfifield\Desktop\Extra Reports"
Example 9: Copy the file to new location adding a Reserved Word date to the file name
To copy a file to a location adding a reserved word date to the file name. This is useful for adding dates other than the run time to the file name.
copy Details.PDF.FullName C:\Users\cfifield\Desktop\{@1MonthsAgoEndDate[Mdyyyy]}NewFile.pdf
Move - For more examples click here.
Example 1: Move a file to another directory with same name
To move a specific file to a new location.
Move DetailExport.pdf C:\Users\cfifield\Desktop\ExtraReports\DetailExport.pdf
Example 2: Move a file to another directory with new name
To move a specific file to a new location with a different name.
Move DetailExport.pdf C:\Users\cfifield\Desktop\ExtraReports\NewDetailExport.pdf
PowerShell Example:
Note: If a file name or directory contains a space the entire file name or path must be between triple quotes. It is also recommended to have scripts be called in a single line.
Example 1: Copying a file to designated location (using triple quotes)
$excelFilePath = """C:\temp\Details.XLSX.FileName"""; $tempFilePath = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($excelFilePath), [System.IO.Path]::GetFileNameWithoutExtension($excelFilePath) + """_temp""" + [System.IO.Path]::GetExtension($excelFilePath)); Copy-Item -Path $excelFilePath -Destination $tempFilePath; Write-Host """File copied to: $tempFilePath"""; Pause
Example 2: Calling a .ps1 file to run in VDM
& """C:\temp\PS Scripts\YourFile.ps1"""
Comments
0 comments
Please sign in to leave a comment.