Home Forums Programming General changing directory in .bat files RE: changing directory in .bat files

  • First, I have a question. Why arent you using SQL Server Compression when backing up? This generally reduces the backup file size down to less than 20% of what it was.

    As far as running 7z in .bat I just use the full path in executing the 7z. So yours would look something like....

    >"c:\program files\7zip\7z.exe" a -t7z C:\offers\datafile.7z "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\*" -p"withoutytreedd" -mhe -r -y

    John