This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have 50 files in a folder that I want to rename. The files in the folder are constantly changing and being updated, so I want to be able to change the file names as they are updated. The idea that I have now is to use the directory tool to bring in all the file names, the RegEx tool to pull the specific portion of the current file name that I want, and then export it via the output tool. However, I'm unable to configure the output tool to rename the files. I tried updating the configuration at the bottom to be "Take File/ Table Name from Field" and "Change File/ Table Name" but that is not working for me.
Thank you for the suggestion Fernando. The issue I'm running into with using the input tool is that the file structure is different for each file. Not all the files have the same sheet names so using the input tool with a dynamic input wouldn't work.
I was looking at what you sent from @bobpeers but the python code suggested gave me an error when I tried running it (unable to resolve plugin Python).
@Snord Could you not use a Run Command tool to run a .bat process file to rename the files as names. I had to do this a few times last year. I just need to find my example. I will put it up when I find it.
@Snord Hopefully, I remember this correctly. I was moving files in and out of a folder to rename them. The rename process involved a little regex and joins, etc. Once I had the new file name created, I used the Run Command tool to run a .BAT command that renamed all the files. I attached an image of my workflow -- the image includes the configuration of the Run Command.
Not that it matters, I am a Mac person and did not know how to do this dynamically on a PC until I got this to work. Also, I picked this up from another Community Post. I will post the citation if I can find it.
Update: Here is the link to the solution that inspired me. Link
Thanks for all the suggestions. I think a big issue that I'm running into is the fact that the files have different structure (some are .xls, .xlsx, .csv and most of them have different tabs with data starting on different lines.
I found this article that gave some more ideas about it as well.