Automation Copy File Activity Add Space to Output Filename

Hello,

Haven't been able to find this in any of the forum or user guide. Two questions:

  1. In the Copy File activity, how do I add a space to the name of the output file, between the contents of the "Copy Name:" field and the "Copy file suffix:"? The copy name is being driven by a variable, and I have tried just typing a space after the variable, but TOAD removes it (i.e. "#variablename# " as my entry). I also tried adding the space into the formatting of my suffix (i.e. DateTime(' YYYYMMDD... etc')) but that didn't work.

  2. Can you link me to a page in the user guide where I could have found this out for myself, if I had known where to look?

Thanks!!

Welcome to the TDP Forum!

Why not simply add the space to your variable value? I just ran a quick test, where I'm prompted for my filename variable value, and I included spaces in the name surrounded by single quotes. Works for me...

1 Like

That would definitely work. I'm using the variable to drive other processes though, where I need it to not have a space, and I was hoping not to have to create a separate set of variables with and w/o spaces. Thanks for answering though!

There's probably a way to get around the extra space thing, but really, probably the simplest method is to define an extra variable entry in your Set Variables step.

I was able to use a variable when naming a file and use spaces. Perhaps I misunderstood the use case here though and so you are looking to do something more complicated. But I made this short video to show what I did. Let me know if it is helpful.

Thanks Julie! I appreciate you proving that it can work. Your solution seems to depend on having something after the spaces. I.e., with nothing after the spaces TOAD will truncate them off (as is happening with my script), while if you have something after them, it won't. Unfortunately for me, it looks like I'm going to have to bite the bullet and do separate variables, because my variables also include the file extension, which means I can't just type it in like you did. Thanks so much for jumping in though!!

1 Like