64 lines
1.9 KiB
PowerShell
64 lines
1.9 KiB
PowerShell
# Environment Variables
|
|
Get-ChildItem env:
|
|
Get-ChildItem env:RC*
|
|
Write-Host 'Getting ENV'
|
|
#Write-Host $env
|
|
|
|
|
|
|
|
|
|
# Compiling and Running
|
|
& "$env:rcbin\cobrc" "@CompileOptions.txt" "E:\Innova\Code\MP\Git\DUTAS_DEVL\DUTAS\Batch\DTSBE127.cob"
|
|
Write-Host 'Compile CHGBD100'
|
|
|
|
& "$env:rcbin\rclrun" "hello"
|
|
|
|
# Syntax Error
|
|
& "$env:rcbin\cobrc" "hello.cob"
|
|
|
|
# Command-line Options
|
|
& "$env:rcbin\cobrc" "hello.cob" :MaxMem="1G" :StringRuntimeEncoding="1252"
|
|
& "$env:rcbin\rclrun" "hello" -StringRuntimeEncoding="1252"
|
|
|
|
# Enable or Disable Warnings
|
|
& "$env:rcbin\cobrc" "warning.cob"
|
|
& "$env:rcbin\cobrc" "warning.cob" :Warnings=-1015
|
|
& "$env:rcbin\cobrc" "warning.cob" :Warnings=-1015,+100
|
|
|
|
# Compiling Multiple Programs at Once
|
|
& "$env:rcbin\cobrc" HELLO.cob WARNING.cob
|
|
& "$env:rcbin\cobrc" *.cob
|
|
|
|
# Repository
|
|
& "$env:rcbin\cobrc" HELLO.cob WARNING.cob :DBDriver=SQLITE :DBConnectString=repository.db3
|
|
|
|
# @-Files
|
|
& "$env:rcbin\cobrc" "@CompileOptions.txt" "@BatchFileList.txt"
|
|
|
|
# Env Variables do not Expand in @-Files
|
|
$env:temp
|
|
& "$env:rcbin\cobrc" "@CobOptions.txt" "@CobSource.txt" -OutputDir="$env:temp"
|
|
|
|
# Copybooks
|
|
& "$env:rcbin\cobrc" "COPYBOOK.cob"
|
|
& "$env:rcbin\cobrc" "COPYBOOK.cob" :IncludeSearchPath=".\INCLUDES"
|
|
|
|
# FileConfig
|
|
& "$env:rcbin\cobrc" "COB001.cob"
|
|
|
|
# Tracing
|
|
& "$env:rcbin\cobrc" "TRACE.cob"
|
|
& "$env:rcbin\rclrun" "TRACE"
|
|
& "$env:rcbin\rclrun" "TRACE" -LogLevel="TRACE"
|
|
|
|
|
|
# Define the path to the directory you want to scan
|
|
$FolderPath = "E:\Innova\Code\MP\Git\DUTAS_DEVL\DUTAS\Batch"
|
|
|
|
# Define the path for the output text file
|
|
$OutputPath = "E:\Innova\Code\MP\Git\DUTAS_DEVL\DUTAS\BatchFileList.txt"
|
|
|
|
# Get all files recursively within the specified folder and its subfolders
|
|
# Select the FullName property (which includes the full path and filename)
|
|
# Export the results to the specified text file, one item per line
|
|
Get-ChildItem -Path $FolderPath -File -Recurse | Select-Object -ExpandProperty FullName | Out-File -FilePath $OutputPath |