-
Scheduler for FTP & BCP
I have a schedule job that performs the following tasks:
1). Exec xp_cmdshell 'erase c:xxxxxxx.txt'
2). Exec @result_ftp=xp_cmdshell c:xxx'ftp.bat'
3). Exec @result_bcp=xp_cmdshell 'c:xxxcp.bat'
How do I make sure that the size of the file after ftp is >0 (ftp successfully)?
How do I write this procedure(just check the size of the file)?
If the ftp does not succefully, the BCP should not start, but the xp_cmdshell command always return 0 which means ran successfully.
Does anyone has an idea? I do appreciate for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|