Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
I am attempting to rename a directory of files using a mapping table containing the current file name, and the name I want the file to be renamed to. I have successfully created the mapping table but struggling with the correct use of the tFileList and tFileCopy syntax.
eg:
From_Name To_Name
kjhfsdkfd34789.jpg Hat-1.jpg
asdsjk894q0dljk.jpg Hat-2.jpg
asdjklj93kl5490.jpg Pants-1.jpg
adkjsdjs9239r47.jpg Shoes-1.jpg
From what I have read I need to utilise global context variables but cant find examples that iterate through the directory and look up the desired output name.
Any assistance is greatly appreciated.
Thanks! Got it working as per below in case anyone else has this requirement.
you could write the filepaths returned by the tFileList to a csv, hash, or temp db table - then feed that through a tmap with a lookup on the from/to names.
Or you can take the iterate of your tFileList and attached it to a tIterateToFlow and feed that result into a tmap with lookup.
Thanks! Got it working as per below in case anyone else has this requirement.