Start a new topic

Changing filenames with query result

Hello, in a process, i'd like to change the names of several files depending on the result of 2 queries. One query gets all the files we need to change the names of (without extension) and the other one gets an integer for each of theses files. I need the process to compare each filename with files of the first query and, when it matches, concatenate its name with '.' and the number corresponding. I tried to use a sqltoparameters or a variable but I didn't get the expected result. 


What is the best way to do this ?


Thanks


Hi Claire,

So, if I've understood your needs, you want to concatenate a filename from the first query with a sequence number from the second one ?
The easy way would be to integrate all your data into the same database schema and manipulate it on only one query.
It's difficult for me to give the best solution without more information... :)

After that, you may put  a bind link and the action you want to use to change your filename (for instance Move File)

I want to concatenate a filename from the first query with a sequence number from the second one where the original filename matches the result from the first query. I have 10+ files to rename. I tried with all my data into the same table. I tried to use sql to parameters, variable and sqlOperation + publish my parameters with a script, none of them have worked. I also tried to rename with a script or Move File without any success. I don't know if the problem is getting my values or the test on the originals filenames or the way I try to use my variables or parameters or something else

Hi Claire,


Could you share your queries (which you're trying to test), structures and an example of your data ? This will help us to understand a little better by contextualizing the requirements.

Login to post a comment