directory

UserPrincipal.FindByIdentity Permissions

I'm attempting to use the .NET System.DirectoryServices.AccountManagement library to obtain the UserPrincipal for a particular Active Directory user. I've got the following code: PrincipalContext context = new PrincipalContext(ContextType.Domain, "DomainName"); userPrincipal = UserPrincipal.FindByIdentity(context, IdentityType.SamAccou...

*FASTEST* directory listing

I have massive directories, and I would like to read all the files as fast as I can. I mean, not DirectoryInfo.GetFiles fast, but 'get-clusters-from-disk-low-level' fast. Of course, .NET 2.0, c# Similar question was here, but this approach wasn't any good: http://stackoverflow.com/questions/1941223/c-directory-listing-massive-directo...

How do you climb up the parent directory structure of a bash script?

Hello, Is there a neater way of climbing up multiple directory levels from the location of a script. This is what I currently have. # get the full path of the script D=$(cd ${0%/*} && echo $PWD/${0##*/}) D=$(dirname $D) D=$(dirname $D) D=$(dirname $D) # second level parent directory of script echo $D I would like a neat way of fin...

c++ program to watch directory for alterations

Hello! I am looking for a way to make a program in C or C++ that detects if there was any files altered, renamed, moved or deleted in a specified directory for Linux systems. Is there a way to do that? ...

Active Directory LDAP query result always missing attributes that are known to exist

Hello, This is a problem Im currently stumped on, a user profile has an attribute 'EmployeeID' that appears when viewing that user with AD Explorer, so data exists, eg value of 12345. Now when I pull that user profile via LDAP, using a tool like Apache Studio, most attributes are returned, but not all, eg EmployeeID. I've experienced t...

Where is my local App Engine datastore?

How can I find where my local development datastore is located? I am using the Python SDK and Linux. ...

C++ Specify Headers Include Directory in Code

Is there a way to specify include directories in the code, perhaps via a #pragma? I have my project setup as "src/" and "include/" folders. I am trying to compile in Visual Studio 2010, but I don't want to set it up in the project settings. Is there another way to allow it to compile instead of having to specify the include as #includ...

Copy specific File from a list to Directory & sub Directory

Friends I have alist of Files and its location, in text format, I want to copy few files to other location maintaing the Directory Tree structure.e.g below give TestFile1 under the subdirectory TestFolder3 e.g. Source File TestFolder TestFile1.txt TestFolder2 TestFile2.txt TestFolder3 TestFile1.txt TestFile3.txt Destination...

Batch script to create folders based on filenames

I have a folder with a lot of PNG images that I want to create folders for based on their filenames. I would then want the files to be moved into their respective folders of the same name and renamed to 0000.png. Example: - abcd.png - efghi.png - jklm.png - nopqr.png - stuv.png - wxyz.png To: - abcd/0000.png - efghi/0000.png - jklm/...

How can I use Delphi to test if a Directory is writeable?

Currently I use this function, based on JCL code, which works fine: function IsDirectoryWriteable(const AName: string): Boolean; var FileName: PWideChar; H: THandle; begin FileName := PWideChar(IncludeTrailingPathDelimiter(AName) + 'chk.tmp'); H := CreateFile(FileName, GENERIC_READ or GENERIC_WRITE, 0, nil, CREATE_NEW, FILE...

Creating Directories to categorize the images based on its type in Java/Android?

I have to create a multiple directory like this path("images/wallpaper/flower"). It should be stored in the External Memory of the phone. How to do it? Any Idea? ...

How to make directory public on Grails?

Hi all, my Grails app generates files in a folder (e.g. "output"). How can I make that folder public, in order to expose the output files through URLs like: http://localhost:8080/MyGrailsApp/output/myOutputFile1.xml http://localhost:8080/MyGrailsApp/output/myOutputFile2.xml Cheers! ...

Tomcat + LDAP issue: socket closed on connection.

I'm trying to configure Tomcat to connect to an LDAP server on our network, and I'm getting the following error: javax.naming.ServiceUnavailableException: xx.xx.xx.xx:636; socket closed at com.sun.jndi.ldap.Connection.readReply(Connection.java:419) at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340) at com.sun.jnd...

FTP -> VSFTPD -> allow uploading folders

I have a Fedora FTP server that uses VSFTPD. I wanted to know how I could allow the users to upload directories and make directories. Thanks in advance. ...

PHP - Code to traverse a directory and get all the files(images)

i want to write a page that will traverse a specified directory.... and get all the files in that directory... in my case the directory will only contain images and display the images with their links... something like this How to Do it p.s. the directory will not be user input.. it will be same directory always... ...

c# check if a directory is hidden?

Possible Duplicate: How to test if directory is hidden in C#? DirectoryInfo dir = new DirectoryInfo(@"c:\test"); if ((dir.Attributes & FileAttributes.Hidden) == (FileAttributes.Hidden)) { //do stuff } With this if statement i would like to test if the directory is hidden. Although the directory really is hidden, my pr...

Bash scripting: Deleting the oldest directory

Hello, I have a simple Bash question which I do not seem to be able to get right. I want to look for the oldest directory (inside a directory), and delete it. I am using the following: rm -R $(ls -1t | tail -1) ls -1t | tail -1 does indeed gives me the oldest directory, the The problem is that it is not deleting the directory, and t...

PHP Iterating through and removing directory issues.

I've built a system whereby users can start a project and upload files to this project. When they create the project, I create a directory specifically for that project and all uploads fill this directory. However, I have implemented a system that allows the user to remove this project if they wish, deleting all the files within the dire...

Python Directory Display in Finder, Explorer, Dolphin, etc... (Cross-Platform).

I would like to find some way of Viewing a Directory in the default file system viewer (Windows Explorer, Finder, Dolphin, etc...) that will work on all major platforms. I do not have the detailed knowledge of Linux, nor of OSX in order to write this. Is there some script out there that will do what I want? ...

I get an invalid query error when I add WHERE Name =

public static void Command(string vCommand, string machineName, string username, string password) { ManagementScope Scope = null; ConnectionOptions ConnOptions = null; ObjectQuery ObjQuery = null; ManagementObjectSearcher ObjSearcher = null; try ...