directory

Link keyword in TextView to file/directory

Is there any way that I can link a keyword in a TextView to a file or directory on the user's SD card? My app produces stack trace files when it crashes and I want the user to able to click a link in my About dialog to view either the latest one or the folder containing all of them. (Something like "If this app crashes, please send [link...

How to get nested directories contents in Perl

Hello all, i'm trying to write a script which would process certain files. The data are organized like this: there is a folder (let's call it X) where my script will be placed. In this same folder there is a subfolder called 'data'. This contains several more subfolders with various names and each of these contains many files (no other ...

HTML - pick images of Root Folder from Sub-Folder

lets say following is the DIR structure of my website Now in index.html i can simply refer images like <img src="./images/logo.png"> but what if i want to refer the same image fron sub.html what will be the src ...

passing a callback as upload_to to FileField

I have an abstract model class UploadItem for handling uploaded files. I want each subclass to be able to define the upload_to path. For this, i pass a callback to the constructor of FileField. This is an example: class UploadItem(models.Model): file = models.FileField(upload_to=UploadItem.get_directory) class Meta: ...

What is a good CMS to use for a Location Based Directory?

I am looking to create a site that contains a directory of places. Each place will include all the basic address information (Street, City, State, etc), and a short description. The end user will be able to search the directory by State, Zip Code, etc. I was wondering what you would recommend as the best CMS to tackle this? Thanks fo...

Working Directory in Visual Studio C# file

What exactly is Working Directory in the properties of Visual Studio C# project. I have see a project where I right click and go to Properties and then I go to Debug tab, it shows me Working Directory where Author of the code has specified folder in local machine. I want to know what does that working directory means and what kinds of f...

How to store directory path in the DB?

I'm trying to store directory path in the database (as we'll be using them in our project very often) and stuck on a question - which way of storing directory paths is more favorable: /my/directory/path/ - with an ending slash /my/directory/path - without an ending slash my/directory/path something else? Any suggestions are greatly a...

directory of .sql file

hi,where is the directory that should we paste the .sql file to use(open,close) in ado.net i want to use a .sgl file in ado.net and i dont know that where should i paste the file that can use in ado ...

windows python script to traverse directory to remove folders, restart PC and continue the next line of the script?

I want to remove a incorrectly installed program and reinstall it. I can remove the program with subprocess.Popen calling the msiexe on it and install new program the same way BUT ONLY with two independent scripts. But i also need to remove some folders in C:\Programs files and also in C:\Doc& Settings. How can i traverse through the dir...

How do I retrieve all filenames in a directory?

How do I retrieve all filenames matching a pattern in a directory? I tried this but it returns the full path instead of the filename. Directory.GetFiles (path, "*.txt") Do I have to manually crop the directory path off of the result? It's easy but maybe there is an even simpler solution :) ...

.Net's Directory Services throws a strange exception

Hi there, I have a small C# solution used to check users credentials. It works fine for two of my teammates, but on my PC I get an exception. The relevant code: PrincipalContext context = new PrincipalContext(ContextType.Domain); if (context.ValidateCredentials(System.Environment.UserDomainName + "\\" + usr, pwd)) return true; el...

Is there a way to check if a directory exists in Apache configuration files?

Is there a way to include configuration settings in Apache based on if a directory exists? Basically I have a portable hard drive that I transport between work and home that has some stuff I'm developing on it. I only want the Apache config to load a particular virtual host if the folder exists. ...

file upload specify default download directory

Hi, I'm looking for a solution , that makes it possible to have the users upload files to the server , but with the ability to specify the default upload directory. The reason is that users have a mapped network drive , where they should put there files ( location is backupped , etc ... ). So , it would be best if each time they want ...

Should I place all the images in the same directory?

I have one simple question. Now I'm working on a e-commerce script and of course users will be able to upload images for each product (up to 10 images for each product). So my question is should I place all the images in the same directory (it will probably be thousands after a time) or create new ones from time to time? Will this slow d...

Linux number of files in directory curiosity

Just out of curiosity, is there any method in Linux to know the number of files in a directory in O(1) (independently of the number of files) without having to list the directory first? I'm searching for an alternative to ls | wc -l. Thanks! ...

Tracking changes in a directory programmacticaly

I have to write a litle app that will process files saved in a given dir. I doesn´t pleases me the idea of writing infinite loops, timers and that kind of stuff. I´d like to know if there if (I would bet a finger that there is!) there is any windows API that would send my app a message for any file saved in that given dir. ...

Free script to open multiple URLs at once

Hi, I am looking for Free PHP script to open multiple URLs at once click. Please let me know if anyone find anywhere. Thanks in advance, Manim ...

get directory iterator to start from the webroot

My development and production sites written in php both need to use directory iterator in order to get at some files. Directory iterator starts at the base directory of the drive i.e c:/. However, on the dev and prod servers the webroot folder is located in a different place. Is there a way I can get directory iterator to start at the w...

Including files issue with relative paths on a linux system

Hi, I have the following directory tree structure: /index.php /code/inc/variables.php /code/inc/config.php index.php is the file that is called. On our development system in: /code/inc/variables.php, when I have the line: require_once("./code/inc/config.php"); it doesnt work and when I have: include_once('config.php'); it does...

cmake best practice

When working with cmake, is it better to work with one large CMakeLists.txt in the root of the project, or as seems to be seen in some places, having one in each subdirectory too? I would assume something along the lines of for large projects, having one in each directory is better. If so, where should the threshold be? ...