Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

zip the file

reposrepos Posts: 1Member
HI
I try to use this script to zip the file and once it done
delete the target file

From this script i can generate the list of the file need to zip
when i try to pass the file name one by one and try to zip i get an error

this is my script

set LOCAL_DIR=C: emp1
if %COMPRESS% equ 1 (
echo %time% - Compressing Data Pump Files >> %SLOG% 2>&1
dir %LOCAL_DIR%%DUMPFILE%*.* /b > %LOCAL_DIR%dir.lst
set DIR_LIST=%LOCAL_DIR%dir.lst

FOR /F %%A IN (%DIR_LIST%) DO (
echo Compressing: %%A
rar.exe a %LOCAL_DIR%%%A.zip %LOCAL_DIR%%%A
if %ERRORLEVEL% neq 0 (echo %time% - *** COMPRESS ERROR *** >> %SLOG% 2>&1)
if exist %LOCAL_DIR%%%A.zip (del %LOCAL_DIR%%%A /q)
)
)

---------------

I get the error in Fo loop


Regards
Sign In or Register to comment.