Replace all images in folder with another image but keep filename

HFE Signs

Business Member
  • Business Listing
    Hi,

    I have a 432 images in a folder with different file names (same image)

    Is there a way to change the image (again just one image) but keep the same file names?

    Thanks
     

    HFE Signs

    Business Member
  • Business Listing
    why is there 431 copies of the same image lol
    Because the system works on unique file names but the image needed to be the same, so the system renamed each image - not sure why you needed to know this? Can you help?
     
    Upvote 0

    HFE Signs

    Business Member
  • Business Listing
    Upvote 0

    japancool

    Free Member
  • Jul 11, 2013
    9,740
    1
    3,449
    Leeds
    japan-cool.uk
    I'm not a programmer so I wouldn't know how to do that, can you help?


    In this case, just make a CSV file container the image you want to copy 431 times in the first column and the target filename(s) in the second column. Should be a doddle in Excel, particularly if the filenames are regular.

    Or, even easier, repeat the copy command 431 times, save it as a .bat file and execute.

    COPY C:\newimage.jpg D:\images\1.jpg
    COPY C:\newimage.jpg D:\images\2.jpg
    COPY C:\newimage.jpg D:\images\3.jpg

    etc.
     
    Upvote 0
    Because the system works on unique file names but the image needed to be the same, so the system renamed each image - not sure why you needed to know this? Can you help?
    Because that is a fundamental data issue.

    As said above, create a text file and repeat the lines as mentioned, ie:

    COPY C:\newimage.jpg D:\images\1.jpg
    COPY C:\newimage.jpg D:\images\2.jpg
    COPY C:\newimage.jpg D:\images\3.jpg

    Then rename the file from "yourfile.txt" to "yourfile.bat" (Assuming this is a windows machine?). then run the file in CMD.

    Make sure you have "show file extensions" turned on in windows so you can rename the .txt to .bat.
     
    Upvote 0

    HFE Signs

    Business Member
  • Business Listing
    Will you ever need to repeat the process?

    I would create 431 symbolic links to one copy of the image file.

    Then, if you ever need to repeat the process all you have to do is replace the image file.
    This is something I need to do in a windows folder
     
    Upvote 0

    fisicx

    Moderator
    Sep 12, 2006
    46,908
    8
    15,499
    Aldershot
    www.aerin.co.uk
    Had to read the opening post twice to understand the problem.

    The only practical solution is to save the new image with the existing file name then duplicate and rename 431 times. A script will speed up the process but you may need to pay someone to do this.

    Or ask on a freelancer site and they can do it for you for a few dollars.

    What’s not clear is how the files are named. Is it for example a sequence or are they all totally different.
     
    Upvote 0
    How did you resolve it?
     
    Upvote 0
    Ahhh! I feel the pain!
     
    • Haha
    Reactions: HFE Signs
    Upvote 0

    HFE Signs

    Business Member
  • Business Listing
    If you had sent me a list of files, I would have knocked you up a script. It would have only taken a 2-3 minutes.
    I would have happily paid, had you of offered at the start - if I need this again, I'll give you a shout
     
    Upvote 0

    HFE Signs

    Business Member
  • Business Listing
    If anyone can make me a simple little program that automatically does it.

    A box with the new image file (box A)
    A box with the current list of files
    A go button!

    And a list of the new files, all with the same names but containing the image from box A

    Who can do this and how much would you charge?
     
    Upvote 0

    japancool

    Free Member
  • Jul 11, 2013
    9,740
    1
    3,449
    Leeds
    japan-cool.uk
    If anyone can make me a simple little program that automatically does it.

    A box with the new image file (box A)
    A box with the current list of files
    A go button!

    And a list of the new files, all with the same names but containing the image from box A

    Who can do this and how much would you charge?

    From memory, I think this will do it:

    Been a while since I used it, and I haven't used the latest version.

    If not, I'll take a look this evening.
     
    Upvote 0

    HFE Signs

    Business Member
  • Business Listing
    From memory, I think this will do it:

    Been a while since I used it, and I haven't used the latest version.

    If not, I'll take a look this evening.
    I've had a quick look, I don't think it will do it but I'll have a closer look later, thanks
     
    Upvote 0

    HFE Signs

    Business Member
  • Business Listing
    Another question for you website guys if you don't mind...

    The folder on our webserver called /webroot/files/img_cache/ can this be emptied? It has thousands of files and I'm wondering if its slowing down the server?
     
    Upvote 0

    DontAsk

    Free Member
    Jan 7, 2015
    5,525
    3
    1,421
    Another question for you website guys if you don't mind...

    The folder on our webserver called /webroot/files/img_cache/ can this be emptied? It has thousands of files and I'm wondering if its slowing down the server?
    If you have access to the server, any folder can be emptied. Just make sure you know, what the consequences might be! Take a backup first.
     
    Upvote 0

    fisicx

    Moderator
    Sep 12, 2006
    46,908
    8
    15,499
    Aldershot
    www.aerin.co.uk
    Another question for you website guys if you don't mind...

    The folder on our webserver called /webroot/files/img_cache/ can this be emptied? It has thousands of files and I'm wondering if its slowing down the server?
    Only if that folder is being accessed. Look at the names and dates of the files. If they are ancient the likelihood it's part of an old configuration. If you have newer files then it could be you have server caching enabled (for faster file access).

    Rename the folder and see if your site still works. If not change it back.
     
    Upvote 0

    Latest Articles

    Join UK Business Forums for free business advice