I'm writing an application that requires a text file to automatically pop open (visible to the user client) after a sequence of database processes are completed. At the end of a SQL file, I have an xp_cmdshell command that reads:
exec xp_cmdshell 'C:\mattermark_etl_project\powershell "C:\mattermark_etl_project\open_file.ps1"'
which executes a powershell script that contains the following:
C:\mattermark_etl_project\python.exe "C:\mattermark_etl_project\open_file.py"
The powershell script executes a python script which contains the following:
import os
def openFile():
fileName = C:\mattermark_etl_project\company_data.txt(ACTIVE)
os.system("C:\mattermark_etl_project\notepad.exe" + fileName)
openFile()
Can someone please help me understand why the text file isn't popping open? SSMS returns output stating the commands ran successfully with "null" results.