on 08-14-2012 12:12 PM
Hi All
I have a scenario where in the existing file in the folder has to be renamed with current timestamp.
I have given the following under OS command line before messge processing.
But the file name is not renaming.
mv /path/FileA.csv /Path/FileA 'date+ %m%d%y%H%M%S'.csv
Not sure whether the above mentioned is correct or not.
Looking for your suggestions.
regards
Venkatesh
Hi, use the complete path for the command (e.g. /bin/mv). Regards, Tobi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkatesh,
Another suggestion, take the command as you have it:
mv /path/FileA.csv /Path/FileA 'date+ %m%d%y%H%M%S'.csv
And execute it as OS level (or ask someone that has OS level access to help) and see the result.
Another suggestion, make sure that your cases are coherent for your 'actual' source and target paths:
i.e. /path & /Path
Regards, Trevor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you check if the command can be successfully run through the Java Runtime.exec(...) API. Also note that the command is run as user "<sid>adm" (Unix) / "SAPService<SID>" (Windows).
When you set the file adapter location to Debug within the Visual Admin\NWA and then retest you may see the root cause of the OS command not executing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I suggest adding the timestamp to the filename using the standard functionality of the file adapter. You find it when configuring the file receiver communication channel under the Processing tab page -> File Construction Mode -> Add Time Stamp. Also refer to SAP help.
Alternatively you can set the filename with DynamicConfiguration in message mapping. There are both blogs and threads available on SCN.
Regards, Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.