directory

Delete Directory in PHP?

how can i delete the directory and its all the files belonging in it with php? ...

Delete all files within a directory vb6

Hi all, I was wondering if anyone could help me with a vb6 function that would delete all files within a directory (excluding subdirectories). Thanks ...

Recursive directory deletion with WIN32

I've written an application that uses the WIN32 api to create a temporarily directory hierarchy. Now, when wanting to delete the directories when shutting down the application I'm running into some problems. So lets say I have a directory hierarchy: C:\temp\directory\subdirectory\ I'm using this recursive function bool Dir::delete...

Delete DIR recursevely if file match? (Powershell)

I was wondering if anyone knew how to delete a directory if it has a specified file in it? For example, if have this directory: PS C:\Users\mike> dir Directory: C:\Users\mike Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 9/17/2009 6:26 PM 6615 pic001.jpg -a-...

Whereto put "plugins" in linux

I am currently developing/hacking an image analyzing/transforming tool. The filters therein will be loaded at runtime using dlopen&co. My question is where do *nix tools usually put plugins (*.so files) when installed? bin/program lib/program/plugins/thisandthat.so maybe? Secondly how do I use it and where do I put it during develop...

Create a directory on an iPhone

Hi to all I want to know how to create a directory on a specified path. I used "system("path of directory");" this is work fine in Simulator but not on Device ...

Recursively search directories in C#

I need to recursively traverse directories in C#. I'm doing something like this. But it throws exception when iterating through system folders. How to check it before exception is thrown? ...

combine directories into a virtual one

Hello in Windows XP Does anybody know a software that maps multiple directories to ONE virtual drive or directory? When I open the virtual directory, I want to see all files from mapped directories as if it was one physical dir. Linux software mhddfs seems to correspond exactly to my need. from http://svn.uvw.ru/mhddfs/trunk/READM...

Stop implicit wildcard in Directory.GetFiles()

string[] fileEntries = Directory.GetFiles(pathName, "*.xml"); Also returns files like foo.xml_ Is there a way to force it to not do so, or will I have to write code to filter the return results. This is the same behavior as dir *.xml on the command prompt, but different than searching for *.xml in windows explorer. ...

How to check dimensions of all images in a directory using python?

I need to check the dimensions of images in a directory. Currently it has ~700 images. I just need to check the sizes, and if the size does not match a given dimension, it will be moved to a different folder. How do I get started? ...

C# - end/finished "event" of a recursive function?

Lets assume the following function: private void ParseFolder(string strFolder) { foreach (string currentFolder in Directory.GetDirectories(strFolder)) ParseFolder(strFolder); } Now we start our recursive loop with: ParseFolder("C:\"); Is there a way to be notified when this recusrive loop ends (= all directories have been p...

How can I get a list of all files with a certain extension from a specific directory?

I'm using this code to get a list of all the files in a specific directory: opendir DIR, $dir or die "cannot open dir $dir: $!"; my @files= readdir DIR; closedir DIR; How can I modify this code or append something to it so that it only looks for text files and only loads the array with the prefix of the filename? Example directory co...

How do I refer to the right Directory?

If my Java Class is in: ` package org.gamehost.flyingame.BookManagementServlet.ModelClass aka: BookManagementSoftwareServlet/org/gamehost/flyingame/BookManagementServlet/ModelClass and in that class, if I want to return a file from a directory, say an html file, after doing this: File newFile = new File("HTMLFile.html");...

How do I use filesystem functions in PHP, using UTF-8 strings?

I can't use mkdir to create folders with UTF-8 characters. <?php $dir_name = "Depósito"; mkdir($dir_name ); ?> But, when I browse this folder in Windows Explorer, the folder name looks like this: Depósito What should I do? ...

Absolute Relative path issues in referenceing web assets - need help - php related

Hi guys I'm in a bit of a pickle here now. Well to start with I built a simple CMS in PHP with an admin panel the directory structure is like this: root/ ->admin/ ->images/ It worked fine as is however the client requirements changed and they wanted that instead of having to access the admin folder as a folder within the root ...

is there a way to parse or read the directory as a file?

This might be sort of trivial question but in any case, i was wondering if there is a way to read a directory as a file which one will be using open(), close(), read() instead of opendir(), closedir(), readdir()... I might be wrong, however, i'm thinking that this can speed-up directory traversing. Thanks ...

How do I create a monitor for a specific directory?

Using Java over Windows Vista, I'm trying to create a kind of a monitor for a directory, so every time this directory is modified (new, renamed, updated or deleted files) a process is triggered. I tried to do this with a loop that will execute a dir in the directory and analyze all the files. But this is very time and memory consuming, s...

Beginner-friendly method to get list of all files and directories

Hello, Using .NET 3.0, I've got the method below which correctly returns a collection of all of the files and directories (and sub-directories) of a specified directory. I'd like to, if possible, dumb this down to only use constructs that I'm pretty comfortable with. Specifically, here are the things I'm not clear on: 1. IEnumerable<Fi...

Debugging GetAllFilesAndDirectories method, when there are empty sub-directories

This method works to get the files, directories and sub-directories and their contents, UNLESS one of the sub-directories happens to be empty. public static IEnumerable<FileSystemInfo> GetAllFilesAndDirectories ( string dir ) { DirectoryInfo dirInfo = new DirectoryInfo( dir ); Stack<FileSystemInfo> stack = new Stack<F...

Opening file in another directory in C

How is this achieved? I want to use pFile = fopen( file, "rb" ); Where file is a char, string or long containing the literal text containing a local path to a binary file C:\Documents and Settings\Supernovah\Desktop\Supernovah.bin but of course that crashes. I am also interested in how to recur over the current directory in a port...