How to not create empty folders? - httrack

I try to download only images from a certain website, with saving original folder nesting structure, where images are located on the website's server.
In filter settings i setup file types to download like:
+www.example.com/*.gif
+www.example.com/*.jpg
+www.example.com/*.jpeg
+www.example.com/*.png
-www.example.com/*.html
And everything runs OK, but HTTrack crreats empty folders where HTML files should be. In result i have full folder structure of the website, where some folders are empty, and some contain images.
The question is: how could i avoid creating of empty folders? I want only folders, which contain images.

Related

How to hide folder routes on EC2

I have an EC2 instance that hosts my site, and I have a question about it, well, I have folders inside the lamp's html folder, example folders are css, js, assets, and the problem is that whenever I type the domain of the site with the route of a folder or any other file, this is opened, example ec2-blah-blah-blah.com/assets (it shows everything inside the folder assets). The question is, how can I hide this? I don't want anyone to have access to folders or x files

Having a file open automatically when the compressed folder containing it is unzipped

I have a compressed (zipped) folder with several KML files and some image files in it. I will soon make the compressed folder available to download from a web site; once the site's user downloads the file, they can unzip it. I am wondering if there is a way to make a certain one of the KML files open in Google Earth automatically as soon as the folder is unzipped (this file is linked to the other KML files in the folder, and opening it in Google Earth is a much handier way of viewing all the KML files than opening each file individually). Is there any way of implementing this? The operating system on my machine is Windows 7, in case this helps.
The act of unzipping a .zip file cannot easily be triggered to open a particular file as you describe on the file system. You would need a drop-box like mechanism with a custom application waiting for new contents in a particular folder.
However, KMZ is a zipped file which when opened by Google Earth will display the root-level KML file (typically named doc.kml) so a workable solution would be to create a single KMZ file with folder-structure as needed. The KMZ file would include a parent KML with links to the sub-KML files either as anchor links (or feature anchor) accessed via feature description and/or as network links.
The parent KML file can have in its top-level KML element an description with an index or table of contents with links to all the sub-KML files.
A working example of a feature-anchor can be found here:
http://kml-samples.googlecode.com/svn/trunk/kml/feature-anchor/feature-anchor-semi.kmz
A good description of feature anchors in action with examples can be found in Chapter 2 of the KML Handbook.

How to find files/folders that change in joomla when content get added from the backend of the site

I need to know which all files or folders can change in joomla when an administrator adds content from backend of the site.If possible list those folders/files
Joomla! uses a database to store all content.
Apart from media files, log files, tmp files and maybe cache, Joomla! does not store anything else in files / folders.
Maybe you can expose your problem more clearly. What do you want to do exactly?

How to download images from the same folder as where the image is uploaded?

I am creating a project wherein the user can upload his photo. This photo is stored in the folder "images/uploads/filename". When his profile is created and the photo is to be shown, I use the <img> tag with src as "images/uploads/filename", but the photo does not show up.
If I manually copy the photo to an adjacent folder "images/abc/filename" and then use it as the source then it works.
How is this caused and how can I solve it? I need to use the same folder to upload and download photos.
That can happen if you're running the webapp as an IDE project and are storing the uploaded images in the IDE's project space. Changes in the IDE's project folder which are performed externally (as by your servlet code) does not immediately get reflected in the deployed server's work folder. Only when you touch it (by refreshing the project) or by copying it (as you happen to have found out), then it will get reflected.
After all, storing uploaded files in the webapp's deploy folder is a bad idea. Those files will get all lost whenever you redeploy the webapp, simply because those files are not contained in the original WAR file.
You need to store them somewhere outside the webapp's deploy folder on a different fixed path like /var/webapp/uploads. You should not use relative paths or getRealPath() to create the File object around it. Just use a fixed path. You can always make the fixed path configureable as a context param setting, a VM argument, a properties file setting or even a JNDI entry.
Then, to serve it to the world wide web, just add exactly that path as another docroot to the server config. It's unclear what server you're using, but in Tomcat it's a matter of adding another <Context> to the server.xml.
See also:
Uploaded image only available after refreshing the page
How I save and retrieve an image on my server in a java webapp
Make sure your have the correct path and include the image extension
just for testing, put your img tag inside the index.php
<img src="images/abc/filename.jpg">
/root/index.php
now put you image in to the your abc/ folder
/root/images/abc/filename.jpg
This should display the image.
if you have your img tag inside another folder in the root like below
/root/user/index.php
now when you use you img tag use this path (relative link):
<img src="../images/abc/filename.jpg">
note the beginning of the image path "../" this is used to go back to the root.
if the php or html file that is holding the img tag is even deeper, just remember to add ../ for every level, 2 folders deep whould be:
<img src="../../images/abc/filename.jpg">
Question was quite vague so hope this is what you are looking for.
let me know and if this is wrong, explain a little more and i will try to help :)

Using folders to keep images neat and organized

So I'm used to this kind of sorting my source files, but I can't seem to be able to find a solution to this problem in Xpages. It would be great if I can store my images like for example: UI images in "ui", layout images in "layout" and so on... Is this possible? Or maybe some kind of workaround?
Thank you!
In image resources, you can also use "virtual folders" to organize the image files.
E.g.
If you have a header image named "header.png". Rename to "layout\header.png".
When you reference this image from the web browser, the path will be:
http://somedomain.com/path/to/db.nsf/layout/header.png
In Package Explorer (or Eclipse Navigator), locate the WebContent folder. This is treated as the "root" of the NSF when an XPage is accessed. If your images are already stored on your hard drive in the folder structure you want to create, you can literally just drag the top-level folder to WebContent, and it'll preserve the exact same structure. You can also manually add folders to WebContent (or any subfolder) using the context menu.
Use the Eclipse Navigator view (add it to your perspective) - there you should be able to create a folder in the images. What works definitely is to use webDAV for design files

Resources