directory

Windows equivalent of ls * (asterisk) directory wildcarding?

Another question from an long-time Unix/Linux user who finds himself in a Windows world. First let me explain exactly what I'm trying to do. I'm using the Windows cmd.exe shell, and I want to list all directories below the current directory that contain a bin\Debug hierarchy, and determine if they contain any files (e.g.: trying to fig...

What is the default current working directoy of a service in Windows?

I'm adapting a program to run as a service, and the first thing it does is open a local configuration file, but it doesn't exist because I don't know what is the current directory. ...

How can I tell when a file has been recently overwritten inside an FTP folder?

I'm writing a Windows Service that needs to take a file from an FTP folder on the local computer and parse the data in that file, and push it to an external source. The file will be uploaded to the FTP folder at some point from some other party, and I can't predict when the file will be uploaded. I need the service to be able to scan t...

How can I merge two directories using opendiff?

This should be simple, right? I want to compare two directories, foo and bar. I want to cherrypick changes in foo and place them in bar. If I run opendiff foo bar -merge bar to specify bar as the merge directory, nothing happens when I "save merge" on my individual files. If I don't specify a merge and select bar as my merge director...

adding relative directory to java classpath and using ClassLoader().getResourceAsStream("")

Is it possible to add a relative directory (ie, foo/bar/plugh) to the java classpath and use InputStream in = getClassLoader().getResourceAsStream("xyzzy.properties"); To fetch foo/bar/plugh/xyzzy.properties? My classpath looks like this: foo.jar;foo/bar/plugh;xyz.jar And I am able to use classes and resources from both foo and x...

What are the ways to make an html link open a folder

I need to let users of an application open a folder by clicking a link inside a web page. The path of the folder is on the network and can be accessed from everywhere. I'm probably sure there is no easy way to do this, but maybe I'm mistaken? ...

CVS: Checkout only the directory structure

How can I checkout only the directory structure of a project (without any files) in a CVS repository? This could be useful, e.g., to know the structure itself, and selectively checkout the folders later. I might not be interested in, say, the test cases folder which might take too much space on my local hard disk. ...

Extract Directory Inside Zip

Hey! I'm writing a script to extract files from a zip archive into the directory that the script is located. Here's my code: $zip = new ZipArchive; if ($zip->open('latest.zip') === TRUE) { $zip->extractTo('.'); $zip->close(); unlink('installer.php'); echo 'it works!'; } else { echo 'failed'; } This works fine, but there's one p...

jQuery pull images from directory

Is it possible to pull a bunch of .jpg pictures form a local file and throw them into a list? Sorry, I was very vague Pulling from a directory (relitive to the index) like. I want to list them in an image tag, sequentially. ...

In detail: mklink and its options.

I recently followed a small tutorial on howto install apache on a systems where you're not the admin. Basically, the original htdocs and conf folders were copied to a map I have ownership over, the original ones deleted and then symbolic links were created. Now, I checked mklink /? and it gives several options. Directory symbolic link...

Sort and display directory list alphabetically using opendir() in php

Hi there, php noob here - I've cobbled together this script to display a list of images from a folder with opendir, but I can't work out how (or where) to sort the array alphabetically <?php // opens images folder if ($handle = opendir('Images')) { while (false !== ($file = readdir($handle))) { // strips files extensions $crap = ar...

Referencing a nib file in a subfolder of an Xcode compiled Cocoa app bundle.

If I have a directory in my Xcode project (not a Group), which is added to the main target, and compile it, how do I instruct an NSViewController to initWithNibName:bundle: a nib file inside that directory? I've tried [viewController initWithNibName:@"FolderName/NibName" bundle:nil], but that doesn't work. Neither does without the folde...

Using JBoss Cache as directory for Apache Lucene

Has anyone tried to store Lucene index in JBoss Cache? Are there any good implementations of Lucene Directory for it? I found sources only for this one but I can't find any documentation or testimonials on it. Basically what I would like to do is to store Lucene index in JBoss Cache and manipulate it with application written with GridGa...

how to get the Directory from Full path in C#?

Hi, i have a Full path as given below... C:\Users\Ronny\Desktop\Sources\Danny\kawas\trunk\csharp\ImportME\XukMe\bin\Debug\DannyGoXuk.DTDs.xhtml-math-svg-flat.dtd No i just want the DTDs directory to be fetched from this whole part? Can i use String methods in this? If yes then how to fetch this directory? Thanks for your help.... R...

\Windows\ versus \Windows\System32 - File location conventions

Is there a standard convention for the types of files that go in \Windows\ versus those that go in \Windows\System32 ?? I'm working on an SDK that has a variety of DLLs a helper exe, and a Windows service exe. The previous guy who worked on the code put the two exe files in \Windows\ and the DLLs in \Windows\System32\ But it seems t...

Upload Entire Directory via PHP FTP

Hey, I'm trying to write a script that will upload the entire contents of a directory stored on my server to other servers via ftp. I've been reading through the documentation on www.php.net, but can't seem to find a way to upload more then one file at a time. Is there a way to do this, or is there a script that will index that direct...

How to quickly get whether a directory has changed using C++ without a monitoring thread or process?

The change includes adding or removing files in the directory, or changes of its sub-directories. Is there any windows APIs which can get thus changes? I don't have a thread or process to monitor the file system. ...

How can one extract the names of files in a folder as text?

For example in windows explorer? ...

Secure directory password protection without .htaccess

Hi, I was going to use .htaccess to password protect a directory for a php script I'm writing, as I do not trust my PHP skills to create a secure login, but I found out you cannot use relative paths for AuthUserFile and I could not generalize this. If you could direct me to a secure PHP login script to password protect a directory I wou...

C# Get UNC path from local directory

Hello, Here is my program: I'm uploading an image(Stream, FileInfo or whatever you like) to a server at this virtual directory: "C:\_Resources\Assets" But then, I want the server to return the UNC path of that image to display it in an tag, that is to say "http://localhost/Trunk/Assets/image.jpeg" In fact, I'm trying to do the opposi...