This script will check to see if a directory exists and if it does not then it will create the directory. I did not create this as a stored procedure but it certainly could be. I tend to just place this as one of my job steps so I can create a backup file of an import file. I also run another script just like this one immediately afterwards but it looks to verify the month folder exists and creates it inside this year folder (both could easily be run together). And finally I run a script to move and rename my import file to the directorys verified and/or created for the current year and month.
Write Reports from SQL to Disk (Even HTML!)
Ever need to write reports out to a folder? I have found that creating output files are SA-WEET! (and easy too) The sample script uses BCP to create an HTML file.This process works well for reports that need to be generated nightly and take too long to run in real time. Use an SMTP mail […]
2002-04-18
4,325 reads