cancel
Showing results for 
Search instead for 
Did you mean: 

Target File naming convention

Former Member
0 Kudos

Hi Experts,

I have a scenario where I need to change my target file name to the required naming convention.

Example: Source file = abc.csv

               Target file name should be abc_mmddyyyy.csv  ( I only need the date. I do not want time )

I am not using mapping in this scenario. Just moving the file from source to target. Please suggest me a solution how to achieve this.

Thanks,

Nani

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

easier way is to use operating system command to rename the file after processing...

Former Member
0 Kudos

Hi SAP Tech,

Thanks for the reply. Please let me know the steps in detail which I need to follow to do the same.

Thanks,

Nani

Former Member
0 Kudos

Hello Nani,

Please go through below links it amy be helpfull for you,

http://155.56.92.22/wiki/pages/viewpage.action?pageId=272171407

http://scn.sap.com/thread/3154451

Regards,

SHRI

gagandeep_batra
Active Contributor
0 Kudos

hi Nani,

You can use rename command like below for adding current date:Run OS Command after message Processing :

i used in dos prompt to rename the file you can modify

according to your need.

rename abc.csv  abc%date:~3,2%%date:~0,2%%date:~6,4%.csv

and it give the output as below

abc11062012.csv

try following command at ur side and check but i am not sure:

as below:

cmd.exe /C "ren %F %F%date:~3,2%%date:~0,2%%date:~6,4%.csv

try with that also:

cmd.exe /C "ren %F %F%%date:~3,2%%date:~0,2%%date:~6,4%.csv

Regards

Gagan

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can create the filename via ASMA in the adapter module (requires development)

or in a dummy mapping,

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Mike,

Thnaks for the reply. Since my scenario does not have a mapping involved, I would like to create my target filename via ASMA in the adapter module (which requires development). Please suggest me the detail steps to do the same.

Thanks,

Nani