directories

How do I recursively create a folder in Win32?

I'm trying to create a function that takes the name of a directory (C:\foo\bar, or ..\foo\bar\..\baz, or \\someserver\foo\bar), and creates directories as necessary so that the whole path is created. I am attempting a pretty naive implementation of this myself and it seems to be a string processing nightmare. There is / vs \, there is ...

Anyone know anything about Directory issues with Flash headers?

I have a flash header and every time that I try to make sub directories with that same header in it it will not show up, but my footer and right ad template will show up (everything but the header). Any suggestions? Thanks! ...

C#: How to check if I can read and/or delete a directory

I loop through a bunch of directories recursively. Some of them (like D:\$RECYCLE.BIN\S-1-5-20) give me a System.UnauthorizedAccessException. I suppose that I can just catch it and move on, but I would rather figure that out in advance. So, when I have a DirectoryInfo object. How can I see if I am allowed to GetDirectories() and possibl...

FileUpload .net control and saving files to virtual folder on remote file server

I have a .net website that resides on a webserver running IIS 6.0 on win2k3 server. This includes a virtual directory that points via a UNC name to a file server. The "connect as" is set to use a service account in our AD domain that has access to the web application as well as write and modify to the file server folder. I am currentl...

List regular files only (without directory) problem

Hello, Do you know why a lot of file are not listed by this program, even if they are "regular"? #include <stdio.h> #include <sys/types.h> #include <sys/param.h> #include <sys/stat.h> #include <dirent.h> int main(void) { DIR *dh = opendir("./"); // directory handle struct dirent *file; // a 'directory entity' AKA file struct...

PHP and regex to find files in directories and then run regex

hi, what's the the most efficient way to find text files in different directories and then run regex to those found files. I will run php/scripts locally. Let's say I have D:\Script\ where i want to run my script from and D:\Script\folder_01, D:\Script\folder_02, etc. where i want that script to look the files from. Those folder names a...

How can I list files under a directory with a specific name pattern using Perl?

I have a directory /var/spool and inside that, directories named a b c d e f g h i j k l m n o p q r s t u v x y z And inside each "letter directory", a directory called "user" and inside this, many directories called auser1 auser2 auser3 auser4 auser5 ... Every user directory contains mail messages and the...

Download a directory over HTTP in Java

I have some files in a directory tree which is being served over HTTP. Given some sub-directory A, in that directory tree I want to be able to download directory A and all containing subdirectories and files. It seems likely that a simple/direct/atomic solution exists in the some dark corner of Java. Does anyone know how to do this? ...

Working with multiple branches in ASP .NET

I've seen several other posts similar to this (namely http://stackoverflow.com/questions/5237/solutions-for-working-with-multiple-branches-in-asp-net) but there are several issues that I have that seem to be different than other similar posts. I have an ASP .NET application that uses a virtual directory off of localhost. There are sever...

How to have pages without filenames (e.g. http://localhost/site/logoff)

I have a test site. I want the user to be able to logoff, but it looks ugly to go to: 'localhost/site/index.php?logoff=y'. I'm a newby at PHP, and it's probably pretty obvious how to do this, but... How would I do this? I want the logoff link to go to 'localhost/site/logoff' Any help appreciated. Thanks ...

Create Sub-directories based on the file names in the folder & move each file into the corresponding sub-folder

Hi, I have about 600 files in a single directory and to meet the requirement of a cataloging application I use - the files need to be in separate folders named after them. For example: filename1.jpg filename2.zip filename3.png ..............and so on...(files have various file exts - folders can have this info or not - doesn't matter if...

System call in unix: directories and files

hi I'm trying to understand system calls: directories and files on unix, .. I found this website where they explain some calls with their own examples, but do not understand these code snippets .. void state (char *file) { struct stat buf; struct passwd *pw; struct group *gr; int i; if (stat(file, &buf)...

Create directories using make file

Hi all, I'm a very new to makefiles and i want to create directories using makefile. My project directory is like this +--Project +--output +--source +Testfile.cpp +Makefile I want to put all the objects and output into the respective output folder. I want to create folder structure which would be like this afte...

find . -type f in ruby

I want to grab a list of all the files under a particular directory. Dir.glob works great, but there doesn't seem to be a way to limit results to just files (excluding directories). Heres's what I have right now: files = Dir.glob('my_dir/**/*').reject { |f| File.directory?(f) } Is there a more elegant way to accomplish this? ...

Is it possible to configure custom plugin directories for Zend?

I want to be able to store custom plugins in the library folder of my application (currently I am storing them in the Zend library itself). Is there a way of providing additional plugin directories in the application.ini file? ...

Why does my Perl open() fail with "Unsuccessful open on filename containing newline"?

I tried to placed ${date[0]} in my directory which is equivalent to 01252010 but @hits not printed. How can I managed to open the directory to get the desired output? Thanks. ERROR: Unsuccessful open on filename containing newline at ./total.pl line 11, line 1. #!/opt/perl/bin/perl -w use strict; open(FH,"/home/daily/scripts/sms_...

command_line argument

I can not get the difference between these sentences! would you please write some snippet code for these sentences?thanks The program will receive a path to a directory as the first command-line argument. The program will receive a path to a file as the second command-line argument. ...

How to test a folder for new files using python

Hello How would you go about testing to see if 2 folders contain the same files, and then to be able to manipulate ONLY the file which is new. A = listdir('C:/') B = listdir('D:/') If A==B ... I know this could be used to test if directories are different but is there a better way? And if A and B are the same, except B has one more ...

Permissions denied for directory - c++

Hi guys, I'm trying to build ogre newton application from svn. I have win7 && vs 2008. There is inc directory which is included into resources (additional include directories). But after compiling I get error: fatal error C1083: Cannot open source file: '*\newton20\inc': Permission denied c1xx What's wrong? ...

Directory printing tool?

I have a very complex web app project I want to re-structure. Naturally, it consists of a considerable number of folders and sub-folders. I have a huge piece of paper ready to sketch a new structure on. Now, I need paper printouts of the projects. Some directories I need in full detail including their files - the /library directory for ...