0

I currently have the following script:

mkdir \\file-srv\Archive\Products\Web\AccountsServices\Account.Toolbar\Nightly\Accounts-4.2-TC-new\%system.build.number%
xcopy /I /E /Y %env.working_directory%\Deployment\Account\Release\*.* \\file-srv\Archive\Products\Web\AccountsServices\Account.Toolbar\Nightly\Accounts-4.2-TC-new\%system.build.number%

What script should I add to create a rar of that folder aside the

\file-srv\Archive\Products\Web\AccountsServices\Account.Toolbar\Nightly\Accounts-4.2-TC-new\%system.build.number%

(same level)

1 Answer 1

2

I suppose you have WinRar installed so you can use its command line (and it's path is in the PATH environment variable otherwise you have to specify the full path).

This will create a file named %system.build.number%.rar (with the right name :)) in the \\file-srv\Archive\Products\Web\AccountsServices\Account.Toolbar\Nightly\Accounts-4.2-TC-new\ folder with all files from %env.working_directory%\Deployment\Account\Release\*.* including all its sub-directories.

rar a -r -y \\file-srv\Archive\Products\Web\AccountsServices\Account.Toolbar\Nightly\Accounts-4.2-TC-new\%system.build.number%.rar %env.working_directory%\Deployment\Account\Release\*.*
2
  • got this error:[11:57:31]: [Step 2/3] 'rar' is not recognized as an internal or external command,
    – Elad Benda
    May 7, 2012 at 10:01
  • "...it's path is in the PATH environment variable otherwise you have to specify the full path...". It means that if the WinRAR folder isn't included in the PATH you have to specify the full path for the RAR command (of course it must be installed on your system!). May 7, 2012 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.