Split up a column into multiple rows based on duplication

Hi, 

I have a list of thousands of picture file-names that I need to import into my website 

each file name starts with the item number of the product the image is associated with and is postfixed with a ‘-1.jpg’

for example 

100041-1.jpg
100041-2.jpg
100041-3.jpg
100041-4.jpg
100042-1.jpg
100042-2.jpg
100042-3.jpg
100042-4.jpg

what I need to do is, combine all files that have the same name into 1 row and separate them by columns. 

like this 

100000-1.jpg 100000-2.jpg 100000-3.jpg  
100041-1.jpg 100041-2.jpg 100041-3.jpg 100041-4.jpg
100042-1.jpg 100042-2.jpg 100042-3.jpg 100042-4.jpg

Please let me know if you have a solution for me. 

Thanks so much! 

 

Alexander

By: alexander fried

Leave a Reply

Your email address will not be published. Required fields are marked *