Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

rename a file with that of another with same substring name

Hi,
I have some files as listed below:
sourceDirectory1: 
ABC_D5.text.yr16.info.201602.txt
ABC_D5.textsample.yr16.info.201602.txt
ABC_D5.textsam.yr16.info.201602.txt
sourceDirectory2:
ABC_text.log
ABC_textsample.log
ABC_textsam.log
Requirement1: move/copy all files (*.txt) from sourceDirectory1 to targetDirectory, as is --> DONE (achieved using tFileCopy).
Requirement2: move/copy all files (*.log)  from sourceDirectory2 to targetDirectory, but these log files must be renamed to corresponding ".txt" file    ---> I could not achieve 0683p000009MPcz.png
Result:
targetDirectory:
ABC_D5.text.yr16.info.201602.txt
ABC_D5.textsample.yr16.info.201602.txt
ABC_D5.textsam.yr16.info.201602.txt
ABC_D5.text.yr16.info.201602.log --->(the actual file is ABC_text.log renamed to this)
ABC_D5.textsample.yr16.info.201602.log --->(the actual file is ABC_textsample.log renamed to this)
ABC_D5.textsam.yr16.info.201602.log --->(the actual file is ABC_textsam.log renamed to this)
Hope I am clear with the requirement, Please let me know if I missed any info to provide.
Thanks in advance.
Labels (2)
10 Replies
Anonymous
Not applicable
Author

Raghavendra,
     I designed the job as per the requirement u mentioned in the post. You try to resolve it and please let me know if I missed anywhere.