Hi @NoahWenger-2370 ,
If you run the bat file in SQL agent job, will it return the different result?
Will the txt file be affected by any other factors such as the file will change data with the time or other data?
Here is a similar thread you may take a carefully reference to see if it could give you some idea.
Also see this bat-file-works-manually-but-does-nothing-in-sql-server-agent-job.
why-does-my-ssis-package-produce-different-results-when-executed-from-a-maintenc
Regards,
Zoe
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.