tagged [directory]

C# delete a folder and all files and folders within that folder

C# delete a folder and all files and folders within that folder I'm trying to delete a folder and all files and folders within that folder, I'm using the code below and I get the error `Folder is not ...

28 Dec at 01:23

Add "Everyone" privilege to folder using C#.NET

Add "Everyone" privilege to folder using C#.NET I have used the code below to allow Everyone access to a folder: ``` System.Security.AccessControl.DirectorySecurity sec = System.IO.Directory.GetAcce...

30 Jun at 15:55

Whats the easiest way to ensure folder exist before I do a File.Move?

Whats the easiest way to ensure folder exist before I do a File.Move? I have a folder structure: > C:\Temp [completely empty] And I have a file that I want to move to > C:\Temp\Folder1\MyFile.txt If ...

3 Aug at 11:13

Getting all file names from a folder using C#

Getting all file names from a folder using C# I wanted to know if it is possible to get all the names of text files in a certain folder. For example, I have a folder with the name Maps, and I would li...

16 May at 20:58

How do I get specific properties with Get-AdUser

How do I get specific properties with Get-AdUser I have the following PS script written: `Get-ADUser -Filter * -SearchBase 'OU=Users & Computers, DC=aaaaaaa, DC=com' -Properties DisplayName | Export-C...

How to check whether 2 DirectoryInfo objects are pointing to the same directory?

How to check whether 2 DirectoryInfo objects are pointing to the same directory? I have 2 `DirectoryInfo` objects and want to check if they are pointing to the same directory. Besides comparing their ...

25 Nov at 01:0

Path.Combine and the dot notation

Path.Combine and the dot notation I'm looking for something akin to `Path.Combine` method that will help me correctly combine absolute and relative paths. For example, I want to yield `c:\alpha\gamma`...

27 Jan at 18:20

Getting the names of all files in a directory with PHP

Getting the names of all files in a directory with PHP For some reason, I keep getting a '1' for the file names with this code: When I echo each element in $results_

5 May at 18:27

Where are the python modules stored?

Where are the python modules stored? I have recently started learning Python and I have 2 questions relating to modules. 1. Is there a way to obtain a list of Python modules available (i.e. installed)...

24 Dec at 00:13

How to get the groups of a user in Active Directory? (c#, asp.net)

How to get the groups of a user in Active Directory? (c#, asp.net) I use this code to get the groups of the current user. But I want to manually give the user and then get his groups. How can I do thi...

24 Mar at 08:41

Public Active directory for testing

Public Active directory for testing I need to write some .NET code for listing user and groups. I am planing to use LINQ. I do not have access to the Active directory for testing. I do not have a serv...

9 Dec at 15:15

Accessing Active Directory from ASP.Net MVC using C#

Accessing Active Directory from ASP.Net MVC using C# I need to access Active Directory to get information about groups that customers belong to. The project I have is an ASP.Net MVC application using ...

How do I find a user's Active Directory display name in a C# web application?

How do I find a user's Active Directory display name in a C# web application? I'm writing a web application which uses windows authentication and I can happily get the user's login name using somethin...

10 Mar at 03:13

Iterate through every file in one directory

Iterate through every file in one directory How do I write a loop in ruby so that I can execute a block of code on each file? I'm new to ruby, and I've concluded that the way to do this is a do each l...

30 Sep at 14:59

Working Directory in Visual Studio C# file

Working Directory in Visual Studio C# file What exactly is in the properties of Visual Studio C# project. I have see a project where I right click and go to and then I go to tab, it shows me Working D...

1 Feb at 22:31

Get profile picture from Azure Active Directory

Get profile picture from Azure Active Directory We have set the Azure AD as a identity provider in our application. We want to display profile picture that should come from Azure AD, in the applicatio...

8 Nov at 15:21

How to get the current working directory's absolute path in Ruby?

How to get the current working directory's absolute path in Ruby? I'm running Ruby on Windows though I don't know if that should make a difference. All I want to do is get the current working director...

4 Sep at 20:2

How do I open a folder from CD drive using VB.NET?

How do I open a folder from CD drive using VB.NET? I'm trying to write a program that opens a folder from the CD disk when a button is clicked. The program will be run from a CD, and aims to open a ce...

1 May at 10:48

How I get Active Directory User Properties with System.DirectoryServices.AccountManagement Namespace?

How I get Active Directory User Properties with System.DirectoryServices.AccountManagement Namespace? I want do get Active Directory Properties from a user and I want to use `System.DirectoryServices....

apache mod_rewrite subdomain to dir

apache mod_rewrite subdomain to dir I have 4 servers, and I want to merge them with a domain. For example, what I am doing now: - - [www.example.org](http://www.example.org)- I want to If any one acce...

How to list the files in current directory?

How to list the files in current directory? I want to be able to list the files in the current directory. I've made something that should work but doesn't return all the file names. It returns `.class...

18 Mar at 17:1

Identityserver 4 and Azure AD

Identityserver 4 and Azure AD I'm looking into using Identity Server 4 for authentication within a C# based MVC application. I'd like to use accounts stored in Azure AD as a source of valid users but ...

C# Best way to get folder depth for a given path?

C# Best way to get folder depth for a given path? I'm working on something that requires traversing through the file system and for any given path, I need to know how 'deep' I am in the folder structu...

9 Aug at 17:38

How to get a user's e-mail address from Active Directory?

How to get a user's e-mail address from Active Directory? I am trying to get a user's email address in AD without success. ``` String account = userAccount.Replace(@"Domain\", ""); DirectoryEntry entr...

26 Jul at 20:2

How to get Directory while running unit test

How to get Directory while running unit test Hi when running my unit test I'm wanting to get the directory my project is running in to retrieve a file. Say I have a Test project named MyProject. Test ...

20 Feb at 12:25