Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
MichalKrawczyk
Active Contributor
Many people on the XI forum are asking about the command line utility (which is available with some adapters
- like File/FTP adapter for example). In this weblog I'm going to present two very simple scenarios
with which using command line can be quite useful.

Case 1

Imagine you need to send the target file to many folders. Would it be wise to create many receivers
(for every folder) and try to use many file adapter communication channles? What if the file had 20 or 50 Mb?
Would you want to overload your file adapters making them create the same file many times? If the answer is "No"
check out the batch file code below. The first example will copy the output file to 4 locations and delete
the old file from the original location:



File adapter configuration looks like this:



Variables used:

%f - original file name

%F - absolute file name (including whole path)

Case 2

We need to archive the target file in a ZIP file. Do we need to write an adapter module for that? Not necessarily
we may try to use a command line archive program. One of them is 7-ZIP ( 7-Zip Command Line Version ).
This example will archive the incoming file to z ZIP file with the same name as the file initially had
and once more remove the "old" file.



Reference:

How to check command lines execution:

XI: Operation system command - error catching

To get more batch file commands:

Batch File Command Reference for Windows 2000

10 Comments
Labels in this area