directory

Python Module Importing Issues

I run Windows 7, and I can import built-in modules, but when I save my own script and try to import it in IDLE, I get an error saying that the module doesn't exist. I use the Python text editor found by clicking "File" and "New Window" from the Python Shell. I save it as a .py file within a Module folder I created within the Python dire...

IIS Virtual and Physical directories as seen from Internet

Hi, I have a problem with physical and virtual directories on my shared windows hosting account, where it's IIS6 and I manage my hosting via Dot Net Panel (2.8.4). I have installed a copy of BlogEngine.net into wwwroot\myblog, and created a virtual directory mydomain.co.uk\blog to point to it. My hoster has enabled my domain to run Appl...

sed output stagnate

I have file names that map to directores. For example. test ---> /to/path/test/program.c I have a line that formats the output of sed into this currently test0 test1 test3 All unique directories, I now need to add leading path and copy their respective c files. Is there a way to stagnate the output of sed while i carry about ther...

c# Save file directory

I want a user to pick a directory to save image files too. I'm new to c#, I've got the image thing working with OpenFileDialog, how would I do the directory thing. Basically, I want it to look like: Save Directory: C:\PATH.... Maybe a FolderBrowserDialog or OpenDirectoryDialog? Thanks for any help. ...

Use git-svn to also control directory versioning.

I want to use git-svn to sync my local computer with my company's remote svn repository. I used to do that, but had to stop because git did not put directories under revision control. The problem is that when I added a new directory git worked just fine, but when I removed a dir the directory would still exist in the svn repository, cau...

.htaccess make folder act as root?

Hi, Is there a way to make .htaccess tell a folder to act as the lowest level? What I mean is this, say you have a folder like so: /about/ /contact/ /css/ /images/ .htaccess index.php header.php If they are at /contact/index.php, then if I have <a href="../index.php">Home</a> to go to the home page, it works all fine, but if they a...

How to check if directory 1 is a subdirectory of dir2 and vice versa

What is an easy way to check if directory 1 is a subdirectory of directory 2 and vice versa? I checked the Path and DirectoryInfo helperclasses but found no system-ready function for this. I thought it would be in there somewhere. Do you guys have an idea where to find this? I tried writing a check myself, but it's more complicated th...

when CreateDirectory returns ERROR_ACCESS_DENIED and "shouldn't"

My Win32 app A1 (actually a collection of processes) is trying to use CreateDirectory to create a directory D1 within parent directory P. The path to P is the value of the TMP environment variable, which makes P a potentially busy but generally permissive place. The vast majority of the time, everything works fine, but, rarely, CreateDir...

Accessing Directories in C

The program is to open a directory and to display the name of the files... i.e if there is a file..it should say FILE....else DIRECTORY.. but the program displays all the files as directory.. Could anyone pls check the code for any errors....thnx #include<stdio.h> #include<dirent.h> #define DIR_path "root/test" main() { DIR...

How to rewrite http root depending on development / production environment (htaccess question)

Hello, I have a development box which contains my site in: http://localhost/dev/ My production environment is just: http://mydomain.com/ I have all my PHP scripts adjusting to different paths automatically, but everytime I upload changes to my .htaccess file, I need to manually change any mentions of my http_root directory "/dev/"...

How to find out if a file or directory exists?

Hi. I am trying to make a simple program that handles files and directories, but I have two major problems: how can I check whether a file or directory exists or not, and how do I know if it is a file, directory, symbolic link, device, named pipe etc.? Mainly file and directories matter for now, but I'd like to know the others too. ...

About the syntax of module rewrite

i have some question about the syntax of module rewrite. i would like to know how to write a rule to not include/contain some file? For example: Directories structure: / /home.php /profile.php /pages /pages/index.php /pages/.htaccess About the /pages/index.php content: <?php include_once "../home.php" ?> About the /home.php cont...

Solution to programmatically generate an export script from a directory hierarchy

I often have the following scenario: in order to reproduce a bug for reporting, I create a small sample project, sometimes a maven multi module project. So there may be a hierarchy of directories and it will usually contain a few small text files. Standard procedure would of course be to create a zip file and send that. But on some maili...

What is the C++ equivalent of PHP's is_dir() ?

What is the C++ equivalent of PHP's is_dir() ? http://www.php.net/manual/en/function.is-dir.php bool is_dir ( string $filename ) Tells whether the given filename is a directory. Working on a Linux platform only, what library would you use? And what if cross-platform support mattered, what method would you use? ...

Does --css-dir always have to be relative to the project directory?

I'm using compass 0.10.4 I'm running a compass command and I want it to put it's output to the server when I run a watch instead of to the project directory. Is there any way of specifying an absolute path instead of a path relative to the directory you want the css output to? I'm trying to have my compiled css output to the directory...

QT Open default file explorer on *nix

I have the following: QProcess *process = new QProcess(this); QString path = QDir::toNativeSeparators(QApplication::applicationPath); #if defined(Q_OS_WIN) process->start("explorer.exe", QStringList() << path); #elif defined(Q_OS_MAC) process->start("open", QStringList() << path); #endif How I can achieve the same behavior for le...

Is there an ANT task for watching a directory for changes?

It sounds a little far fetched to me, but is there an ANT task for watching a directory for changes and then running a particular ANT class when the directory changes? ...

What causes CreateDirectory to return ERROR_ACCESS_DENIED?

In another question, we established that yes, CreateDirectory occasionally fails with the undocumented GetLastError value of ERROR_ACCESS_DENIED, and that the right way to handle the situation is probably to try again a few times. It's easy to implement such an algorithm, but it's not so easy to test it when you don't know how to reprodu...

check for files with PHP.

Is there a function that can be used to get the contents of a directory (a photo gallery directory for example) ? I'm trying to save time on a project by automating a photo gallery based on which files are available. Thanks Shane ...

Ignore an entire directory in Visual Studio before a build?

I currently have a project I am building in Visual Studio 2005 and I need to be able to build the part of the project some of the time with directory A and sometimes with directory B and never both. If you right click a file (foo.f) --> Click Propeties --> you can change the "Exclude File From Build" from NO to YES and the project will ...