tagged [directory]

C# How to know if a given path represents a root drive?

C# How to know if a given path represents a root drive? How can I know if a given directory is a root drive? (aside from checking if its path equals to "A:", "B:", "C:", etc.)

18 Feb at 23:14

Find the current directory and file's directory

Find the current directory and file's directory How do I determine: 1. the current directory (where I was in the shell when I ran the Python script), and 2. where the Python file I am executing is?

21 Nov at 14:25

how to list all sub directories in a directory

how to list all sub directories in a directory I'm working on a project and I need to list all sub directories in a directory for example how could I list all the sub directories in c:\

4 Sep at 01:58

Enumerate Windows network shares and all custom permissions on or within

Enumerate Windows network shares and all custom permissions on or within We have various servers that have many directories shared. It's easy enough to look at the share browser to see what the "top l...

Best way to iterate folders and subfolders

Best way to iterate folders and subfolders What's the best way to iterate folders and subfolders to get file size, total number of files, and total size of folder in each folder starting at a specifie...

21 May at 09:35

How to delete empty folders using windows command prompt?

How to delete empty folders using windows command prompt? I need to delete all empty folders from my application folder using windows command prompt? How can I create a bat file like that? Please help...

Azure AD v2 roles not included in Access Token

Azure AD v2 roles not included in Access Token I'm using [https://login.microsoftonline.com/.../oauth2/v2.0/token](https://login.microsoftonline.com/.../oauth2/v2.0/token) to authenticate (authorizati...

How to create a directory in Java?

How to create a directory in Java? How do I create Directory/folder? Once I have tested `System.getProperty("user.home");` I have to create a directory (directory name "new folder" ) if and only if ne...

28 Dec at 11:51

What does "opt" mean (as in the "opt" directory)? Is it an abbreviation?

What does "opt" mean (as in the "opt" directory)? Is it an abbreviation? What does "opt" mean (as in the "opt" directory)? I commonly see this directory in Unix systems with development tools inside. ...

26 Nov at 10:19

Get application directory using C# Console Application?

Get application directory using C# Console Application? I found something on google but it not working on C# Console Application What I found: How I can get application directory using c# Console Appl...

13 Oct at 16:4

How to programmatically move, copy and delete files and directories on SD?

How to programmatically move, copy and delete files and directories on SD? I want to programmatically move, copy and delete files and directories on SD card. I've done a Google search but couldn't fin...

10 Dec at 11:26

What are CN, OU, DC in an LDAP search?

What are CN, OU, DC in an LDAP search? I have a search query in LDAP like this. What exactly does this query mean?

21 Feb at 12:8

How to create Azure AD user programmatically?

How to create Azure AD user programmatically? I understand there is azure portal to manage groups, user and etc. Are there any ways to do it programmatically (either using web-api or sdk in C#)? Thank...

26 Jun at 09:35

How can you test if an AD password will meet configured complexity requirements?

How can you test if an AD password will meet configured complexity requirements? In a net 3.5 csharp application I need to know in advance if an AD password will meet configured complexity requirement...

25 Sep at 01:32

How to see if a directory exists or not in Perl?

How to see if a directory exists or not in Perl? To see if a file exists before using it, we can use: But how to indentify a directory exists or not?

20 Dec at 04:49

Revoke shared folders in windows

Revoke shared folders in windows Over the last few months/years, I have shared a folder or two with numerous people on my domain. How do I easily revoke those shares to keep access to my system nice a...

List all computers in active directory

List all computers in active directory Im wondering how to get a list of all computers / machines / pc from active directory? (Trying to make this page a search engine bait, will reply myself. If some...

22 Oct at 07:36

How can I list the contents of a .zip folder in c#?

How can I list the contents of a .zip folder in c#? How can I list the contents of a zipped folder in C#? For example how to know how many items are contained within a zipped folder, and what is their...

25 Jan at 22:2

How to delete a folder in C++?

How to delete a folder in C++? How can I delete a folder using C++? If no cross-platform way exists, then how to do it for the most-popular OSes - Windows, Linux, Mac, iOS, Android? Would a POSIX solu...

22 Dec at 14:12

Calculating a directory's size using Python?

Calculating a directory's size using Python? Before I re-invent this particular wheel, has anybody got a nice routine for calculating the size of a directory using Python? It would be very nice if the...

1 Feb at 00:51

Exclude certain file extensions when getting files from a directory

Exclude certain file extensions when getting files from a directory How to certain file type when getting files from a directory? I tried But it seems that this function can only choose the file types...

19 May at 12:48

Getting a list of all subdirectories in the current directory

Getting a list of all subdirectories in the current directory Is there a way to return a list of all the subdirectories in the current directory in Python? I know you can do this with files, but I nee...

16 Jun at 21:45

Tree view of a directory/folder in Windows?

Tree view of a directory/folder in Windows? In Linux/KDE, I can see a directory as a tree. How can I do it in Windows 7? Consider I do NOT mean "Windows Explorer". This just shows the directories, I a...

Directory vs DirectoryInfo

Directory vs DirectoryInfo Are they equivalent or alternatives to each other? Is any of them deprecated and if so, which one? Which one is recommended for use in an ASP.NET web application? My aim is ...

17 Dec at 00:9

What are the different properties available in System.DirectoryServices.DirectorySearcher.PropertiesToLoad

What are the different properties available in System.DirectoryServices.DirectorySearcher.PropertiesToLoad Everything I've googled just says you can add them as a string array, but doesn't say what th...

How to change directories on console application

How to change directories on console application I am creating a simple explorer program for an assignment on c# and have the directory set to `c:\\Windows` How you would be able to change the directo...

10 Jan at 15:40

Cross-platform way of getting temp directory in Python

Cross-platform way of getting temp directory in Python Is there a cross-platform way of getting the path to the `temp` directory in Python 2.6? For example, under Linux that would be `/tmp`, while un...

How can I tell where mongoDB is storing data? (its not in the default /data/db!)

How can I tell where mongoDB is storing data? (its not in the default /data/db!) My host came with a mongodb instance and there is no /db directory so now I am wondering what I can do to find out wher...

22 Sep at 17:57

Get path to execution directory of Windows Forms application

Get path to execution directory of Windows Forms application I would like to get the path to the execution directory of a Windows Forms application. (That is, the directory in which the executable is ...

20 Dec at 16:15

How to get all files under a specific directory in MATLAB?

How to get all files under a specific directory in MATLAB? I need to get all those files under `D:\dic` and loop over them to further process individually. Does MATLAB support this kind of operations?...

Get folder name from full file path

Get folder name from full file path How do I get the folder name from the full path of the application? This is the file path below, Here "text" is the folder name. How can I get that folder name from...

8 Mar at 16:23

Listing only directories using ls in Bash?

Listing only directories using ls in Bash? This command lists directories in the current path: What exactly does the pattern `*/` do? And how can we give the absolute path in the above command (e.g. `...

1 Sep at 14:33

How do I get the first name and last name of the logged in Windows user?

How do I get the first name and last name of the logged in Windows user? How I can get my first name last name with c# in my system (logging in windows with Active Directory username and pass)? Is it ...

1 Feb at 20:31

Reading Group Policy Settings using C#

Reading Group Policy Settings using C# How do I go about iterating over available and/or set settings in a given GPO (using name or GUID) in an AD domain? Without having to export to XML/HTML using po...

15 Mar at 23:35

Windows service - get current directory

Windows service - get current directory I have a Windows service that should look for a configuration file in its current directory. So I use `directory.getcurrentdirectiry()` but instead of the servi...

Can't remove a directory in Unix

Can't remove a directory in Unix I've got a seemingly un-deletable directory in Unix that contains some hidden files with names that start with `.panfs`. I'm unable to delete it using either of these ...

23 Dec at 11:41

How do I get the directory from a file's full path?

How do I get the directory from a file's full path? What is the simplest way to get the directory that a file is in? I'm using this to set a working directory. In this example, I should get "C:\MyDire...

6 Feb at 16:25

Check UserID exists in Active Directory using C#

Check UserID exists in Active Directory using C# How can we check whether the USERID exists in Active Directory or not. I have LDAP String and UserID, can I find whether that UserID exists in Active D...

26 Jun at 15:16

Find out when file is added to folder

Find out when file is added to folder I would like to know if it is possible to find out when a file is added to a folder in C#. I know you can see the time of creation and many other things in the Fi...

7 Feb at 14:45

How to programmatically change Active Directory password

How to programmatically change Active Directory password I have a set of test accounts that are going to be created but the accounts will be setup to require password change on the first login. I want...

lookup user in ActiveDirectory by email address

lookup user in ActiveDirectory by email address How can I query an ActiveDirectory user by email address? A given user can have multiple emails such as both john.smite@acme.com and jsmith@acme.com. Fo...

6 Sep at 12:54

How to find all files containing specific text (string) on Linux?

How to find all files containing specific text (string) on Linux? How do I find all files containing a specific string of text within their file contents? The following doesn't work. It seems to displ...

27 Sep at 12:52

Authenticating in PHP using LDAP through Active Directory

Authenticating in PHP using LDAP through Active Directory I'm looking for a way to authenticate users through LDAP with PHP (with Active Directory being the provider). Ideally, it should be able to ru...

How do I find out where login scripts live?

How do I find out where login scripts live? I am looking for a way (manual or progamatic) to find out where the user's activer directory login script is located. I can parse the results of "net user" ...

19 Mar at 18:33

Directory.Move doesn't work (file already exist)

Directory.Move doesn't work (file already exist) I've got main folder: And there I have 2 folders: Movies and Photos. Photos has three folders with files with the same structure: People, Animals and B...

31 Mar at 12:57

How do you get a list of the names of all files present in a directory in Node.js?

How do you get a list of the names of all files present in a directory in Node.js? I'm trying to get a list of the names of all the files present in a directory using Node.js. I want output that is an...

How to get current working directory in Java?

How to get current working directory in Java? Let's say I have my main class in `C:\Users\Justian\Documents\`. How can I get my program to show that it's in `C:\Users\Justian\Documents`? Hard-Coding i...

18 Dec at 18:57

In a Git repository, how to properly rename a directory?

In a Git repository, how to properly rename a directory? I think it should work to copy the directory to be renamed to a new directory with desired name, and [delete the old directory](https://stackov...

17 Jan at 12:44

Find directory name with wildcard or similar to "like"

Find directory name with wildcard or similar to "like" I am using the following command to find a directory name. My problem is, I am not sure what the exact directory name is, so I would like to find...

7 Sep at 08:37

List directories in Windows Azure Blob storage container

List directories in Windows Azure Blob storage container I have a question about my project... I need to know how to list all folders (in a string list or something) from a Windows Azure blob storage....

24 Jan at 14:35