如何通过SSIS将变量传递给批处理文件 [英] How to pass a variable to the batch file through SSIS
问题描述
我的要求是通过Putty删除SFTP文件。
My requirement is delete the SFTP files through Putty.
如果文件在批处理文件中被硬编码,我正在成功删除SFTP中的文件。
I am successfully deleting the files from SFTP, if the file is hardcoded in the Batch file.
但我想在运行时将变量传递给批处理文件。
But i want to pass the varaible to the batchfile at runtime.
对于这个过程,我正在使用执行流程任务。
For this process i am using Execute process task.
我当前的参数: \\sharedfolder\test\putty\pftp.exe
My current Parameters : \\sharedfolder\test\putty\pftp.exe
参数: 用户名@ ftpsite -pw密码-be -batch - b \\\HharedFolder \\\ ttyty \ deletefiles.bat
Arguments : Username@ftpsite -pw password -be -batch -b \\SharedFolder\putty\deletefiles.bat
BatchFile:
BatchFile :
Cd / fromfolder
Cd /fromfolder
del abc.txt
del abc.txt
我不知道如何在运行时将变量传递给批处理文件。请帮我解决这个问题。
I dont know how to pass the variable to the batch file at run time. Please help me in resolving this.
推荐答案
嗨PRaju_428,
Hi PRaju_428,
使用表达式。您可以将Arguments设置为SSIS变量驱动,例如:
Use the expression. You can set the Arguments to be a SSIS variable driven, for ex:
这篇关于如何通过SSIS将变量传递给批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!