Jump to content

Recommended Posts

Hi everybody !

 

I have a big problem with my images on my FTP... A friend has uploaded thousands of images with a "+" character in the filename on our FTP. For some reasons, my CMS doesn't support it and I need to change the "+" character by a "_" character, directly on the FTP cause it will rake too much time to download all the images and upload them again.

 

So I need a script (PHP ?) that will go in the right subdirectory and replace the "+" if it exists by the "_" character.

 

Someone could help me ?

 

Thanks,

 

Cedric

If I'm not good enough to write it myself, I can just go out ? I tought it was a mutual assistance forum...

If I could write it myself, I would not be here...

It is, we will happily assist you with your code, which you don't have any of, hence the glaring lack of assistance. If you want someone to write the code for you there is a freelance section where you can request someones services for a suitable fee.

Getting flippent isn't going to endear anyone to your cause any faster. The statement isn't "If I'm not good enough to write it myself, I can just go out" it's more along the lines of "If your not going to bother your arse to even try, when it is you that will get the benefit, then why the hell should we when we will get none?"

Here are some php manual entries for functions you might find useful for this. At least have a look and see what you can come up with. If you have any questions about the functions, please do ask.

 

glob

foreach

str_replace

rename

You mean the fact that files can be ftp'd with those characters to begin with? Short of writing a shell script to change the file names, there isn't much I can think of. Since the characters are technically valid for use in file names, I'd be more likely to alter the CMS code to eliminate the problem.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.