I am sorry if I am in the wrong place!
I have been looking for a way to isolate and FTP out of the server hundreds of images which are no longer doing anything there, that is, that are not linked to any page.
The only thing I found (free) was the following script. If I am useless at html/css , then this script is Chinese to me!
Could you tell me if it would work, what I have to change, and where to place it, please?
Please use CODE tags, not ICODE.
Please convert the output(file) from Windows to linux format, the current output is invalid, as its missing linebreaks.
You could use Notepad++ or any other TEXT editor (= NOT ms Word!) that lets you save/convert files to linux with utf8 w/o bom , then copy-paste again.
If you have a bash environment in windows, i'd put the script in $HOME/bin or /bin.
Then you could just type: remover.sh in the shell and pass the values, otherwise, you'd need to change to the dir and type ./remover.sh , or just type the /full/path/to/remover.sh .
/path/to/clear, represents the full path to the local files, has to be quoted if it contains spaces
BASEURL, should be a quoted url, like "http://www.pintotours.com"
The eimages are in the server not in my computer. The important thing to start with is to separate the images, i.e. the one not being used could be put in another folder.
After that I could FTP them to my computer. So, I suppose we can forget about my Windpws machine, unless you are telling me that the commands have to come from here.
I'm sorry but I really don't understand this code
Does the script need altering in any way' i just added bits and pieces without knowing what I was doing!
Should save a new file called files_to_remove.txt with a list of all unused images.
I highly recomend to first get such a list before (re-)moving anything.
Expecting that the list either contains only the filename, and that are images are in a single folder, you could then try something like:
put files_to_remove.txt
mkdir /bkp_imgs
cd www/pintotours/images
while read img ; do mv $img /bkp_imgs ; done</files_to_remove.txt
The files (images) are in a server run on Apache. All I need really is to separate the images there from where they are (doing nothing as they are no linked to any htl or php file) and placing them in anew file IN THE SERVER called, say, files_to_remove.txt, as you said.
Then, the question fo dealing with them, is not a problem to me and I do not need any scripts.
So will this script do the job in the server and how would I start? I take it that I would have to upload it and then soemhow get it to do the job