Question : Batch File Script Issue

All want is I got two files in CSV format, PLUSale and ProductCatalog. I need to compress them and move the files to indiviual directory thats all.

Below script works fine, but it has to ZIP the files with same name as CVS file. Which I am not understanding how to do


set SSIS_FTPFILE_ORG=I:\Information Technology\Retail\Durga\OsPos\Store Files\
set SSIS_FTPFILE_DEST=I:\Information Technology\Retail\Durga\OsPos
set LOGFILE=%SSIS_FTPFILE_DEST%zbatlog%curdate%.txt
"C:\Program Files\7-zip\7z.exe" a "%SSIS_FTPFILE_DEST%\ProductCatalog\ProductCatalog.zip" "%SSIS_FTPFILE_ORG%\ProductCatalog.csv" >>"%LOGFILE%"
"C:\Program Files\7-zip\7z.exe" a "%SSIS_FTPFILE_DEST%\PluSales\PluSales.zip" "%SSIS_FTPFILE_ORG%\PluSales.csv" >>"%LOGFILE%"

Any help please.

Thanks,



Answer : Batch File Script Issue

The 'a' command for 7-zip is simply archiving the files under the name specified ("%SSIS_FTPFILE_DEST%\PluSales\PluSales.zip"). Do you want the name of the archive to be created differently? You should be able to change it in the script to whatever you like.

Syntax of the statement:
Program path = "C:\Program Files\7-zip\7z.exe"
archive command= a
archive file name = "%SSIS_FTPFILE_DEST%\PluSales\PluSales.zip"
source file name = "%SSIS_FTPFILE_ORG%\PluSales.csv"
output to command = >>
log file name = "%LOGFILE%"
Random Solutions  
 
programming4us programming4us