directory

Import Picture from file to Picture Box... need help...

In my project, I have a list box. When I click an item on the listbox, I want the PNG image from a file (stored in Global Varible, GV.dir) into the Picture Box named picBox... this is what I have... picBox.Image = Image.FromFile(GV.dir + lstFull.SelectedIndex.ToString() + ".png"); GV.dir is equal to -> @"C:\Files" ...

What is the most scalable PHP-based directory structure for a large site?

I am creating a very large PHP MVC-based site that will have a large library of php classes, javascripts, and many css files (not to mention a large amount of files for the MVC). For the first time ever, I am actually taking the time to plan out a clean and organized directory structure. What directory structures do you typically use, ...

How to create target directory structure for copy files in classic ASP?

Hi, I want to copy a file to target directory. It is simple with copyFile command of File system object. But I need some enhancement like, If target directory is not exist then it'll create target directory and then copy a file. Can you help me achieve it? Let me know if there are other ways to do same. Thanks. Solution: 'Create f...

Calculating a directory size using Python?

Before i re-invent this particular wheel, has anybody got a nice routine for calculating the size of a directory using Python? It would be very nice if the routine would format the size nicely in Mb/Gb etc. Thanks. ...

In an Eclipse plugin, how can I make a DirectoryFieldEditor start with a particular path?

I am making an Eclipse plugin which on right clicking a project produces a UI. In this UI I have used DirectoryFieldEditor. This produces directory dialog starting at "MyComputer" as root. What i want is it to show paths starting at the project which i right clicked. how can this be achieved? I am trying to mimic when you right click a...

mod_rewrite: Redirect if anything but a file

I have an Apache .htaccess file in the parent directory to directory this .htaccess file is currently located. This works perfectly redirecting all requests as required. However, I would like it so in this directory, if the request is for a valid file (and NOT a directory), ignore the main rewrite rule. Currently, the following turns of...

java.util.zip - Recreating directory structure

Hello there. While trying to zip an archive using the java.util.zip I ran into a lot of problems most of which I solved. Now that I finally get some output I struggle with getting the "right" output. I have an extracted ODT file (directory would be more fitting a description) to which I did some modifications. Now I want to compress that...

How do I iterate through a directory in Common Lisp?

I'm using OpenMCL on Darwin, and I'd like to do something like: (loop for f in (directory "somedir") collect (some-per-file-processing f)) But I can't get directory to return anything other than NIL, and I can't seem to find any good explanation online (other than "its different for each system"). Any pointers? ...

Set working directory in javascript

Does anyone know how to set the working directory in JavaScript before? Code I use for launching an application is this: // Create an object script oL = new ActiveXObject("WScript.Shell"); oFile = '"C:/Application.exe"'; oL.run(oFile); ...

System.Security.Permission.FileIOPermission

Why do I get a "System.Security.Permission.FileIOPermission" error? Below is basically my whole program. It is extremely simple. All it needs to do is create a copy of a folder. It works on my PC and and number of my colleagues' PCs, but for some it gives the error above. Any ideas? public static void CopyAll(DirectoryInfo sour...

Directory structure of Mobiles connected as USB pendrive

Hi, I need to find photos on external devices like cameras and mobiles connected as USB pendrive. As I don't want to traverse all disks, I thought of looking for specific folders under root or deeper, e.g. DCIM for cameras and start traverse from there. For cameras the directory structure is specified in the Design rule for Camera File ...

A recursive remove directory function for PHP?

I am using PHP to move the contents of a images subfolder GalleryName/images/ into another folder. After the move, I need to delete the GalleryName directory and everything else inside it. I know that rmdir() won't work unless the directory is empty. I've spent a while trying to build a recursive function to scandir() starting fr...

Do I have to write my own method to unset readony on a folder and it's contents in C#?

Hi all. I have a folder with some folders in it and some files in those folders. It so happens, that those file may be readonly which is not acceptable for me. The questions is do I have to write the code to recursively unset readonly on all files? It's not difficult to write but is there any standard .NET way to do it? My current so...

Wicket directory structure

Hey! I'm trying to figure out the directory structure of wicket. I don't get it at all! Let's say I wanna load an image with images/logo.gif or something like that. Where do I have to place the images folder? Please help me with this! ;) ...

Google thinks my home page IS a trailing slash

I am desperate to know why Google webmaster tools AND analytics are registering my home page as a trailing slash?! There are no crawl errors, 401s, search issues, nothing wrong otherwise. My home page is written with a trailing slash and if a visitor does not include the slash, my site will automatically fetch the / and send them to ht...

How do I prevent Visual Studio from creating obj folders in my source directory?

I've set the OutputPath, IntermediateOutputPath, and BaseIntermediateOutputPath tags in all my csproj files. Despite that, Visual Studio creates extra "obj" folders in my source directories. As far as I can tell, it creates the directory obj\Debug\TempPE and then leaves it empty. I don't mind Visual Studio creating all sorts of crap, bu...

Default modular directory structure for Zend Framework application

I'm aware of default directory structure for Zend Framework modular applications that is in the manual. /application /controllers /modules /admin /controllers /views /views /configs /www index.php But I'm wondering why should I do it this way. It really sux to have the default module in /application and othe...

Good C++ directory and file library?

Hello everyone! I am making an application in C++ for windows, and one of its prime functions has to be directory and file io (searching, creating, etc). I basically want to be able to recursively search directories, and most of all be able to get the file names in a directory. Then I want to be able to get the directory names in the cur...

How to find all links / pages on a website

Is it possible to find all the pages and links on ANY given website? I'd like to enter a URL and produce a directory tree of all links from that site? I've looked at HTTrack but that downloads the whole site and I simply need the directory tree. Thanks Jonathan ...

.NET: easier way to test for directory than bit masks?

Is there an easier way to test if a file system item is a directory than using bitmasks? I have this code in one of my applications (two second line is actually in a loop over folderItems but for simplicity assume the first element): Dim folderItems As String() = Directory.GetFileSystemEntries(aFolder) Dim someDirItem As String = folde...