the .cmd script could be replaced with autoit code.
explain to us what nircmd does?
show us Type_1.edl, a .wav file, and the .edl file that nircmd produces for the .wav file
and maybe even nircmd could be bypassed
here is a start
#include <FileConstants.au3>
#include <Array.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
; ------------------------------------------------------
; Main script to create .edl files from selected .wav files
_CreateT1Data()
Func _CreateT1Data()
; Ask the user if they want to create T1 data from .wav data
Local $confirmCreate = MsgBox(4, "NOTICE!", "Create T1 Data from .wav data?")
If $confirmCreate = 6 Then ; If "Yes" is selected
; Prompt the user to select the source folder containing .wav files
Local $sourceMessage = "Select Source folder..."
Local $sourceFolder = FileSelectFolder($sourceMessage, "F:\Audio\Type_1\wav")
If @error Then
MsgBox($MB_ICONERROR, "Error", "No folder selected. Exiting.")
Return
EndIf
; Prompt the user to select the destination folder for the .edl files
Local $destMessage = "Select Destination folder for .edl files..."
Local $destFolder = FileSelectFolder($destMessage, "G:\Session_Master\Show")
If @error Then
MsgBox($MB_ICONERROR, "Error", "No destination folder selected. Exiting.")
Return
EndIf
; Store the list of .wav files from the selected source folder
Local $wavFiles = _FileListToArray($sourceFolder, "*.wav", $FLTA_FILES)
If @error Then
MsgBox($MB_ICONERROR, "Error", "No .wav files found in the selected folder.")
Return
EndIf
; Specify the path to the master .edl file
Local $masterEdlFile = @ScriptDir & "\Type_1.edl" ;"G:\Session_Master\Show\Session_Data\Type_1.edl"
If Not FileExists($masterEdlFile) Then
MsgBox($MB_ICONERROR, "Error", "Master .edl file not found.")
Return
EndIf
; Process each .wav file and create corresponding .edl file
For $i = 1 To $wavFiles[0]
Local $wavFileName = $wavFiles[$i]
Local $wavBaseName = StringTrimRight($wavFileName, 4) ; Remove the ".wav" extension
; Destination .edl file path for each .wav file
Local $newEdlFile = $destFolder & "\" & $wavBaseName & ".edl"
; Copy the master .edl file and rename it for each .wav file
FileCopy($masterEdlFile, $newEdlFile, $FC_OVERWRITE)
Next
MsgBox($MB_ICONINFORMATION, "Success", "All .edl files have been created successfully.")
ElseIf $confirmCreate = 7 Then
MsgBox($MB_ICONINFORMATION, "Cancelled", "Operation cancelled by the user.")
EndIf
EndFunc