tagged [directory]
Delete directories recursively in Java
Delete directories recursively in Java Is there a way to delete entire directories recursively in Java? In the normal case it is possible to delete an empty directory. However when it comes to deletin...
- Modified
- 14 Sep at 13:35
How to get the newest (last modified) directory [C#]
How to get the newest (last modified) directory [C#] Currently my application uses string[] subdirs = Directory.GetDirectories(path) to get the list of subdirectories, and now I want to extract the pa...
How do I find the parent directory in C#?
How do I find the parent directory in C#? I use this code for finding the debug directory `"C:\\Users\\Masoud\\Documents\\Visual Studio 2008\\Projects\\MyProj\\MyProj\\bin\\Debug"` How can I find the ...
- Modified
- 14 Mar at 01:43
Creating a temporary directory in Windows?
Creating a temporary directory in Windows? What's the best way to get a temp directory name in Windows? I see that I can use `GetTempPath` and `GetTempFileName` to create a temporary file, but is ther...
- Modified
- 27 Apr at 17:21
Delete files from directory if filename contains a certain word
Delete files from directory if filename contains a certain word I need to check a directory to see if there are any files whose file name contains a specific keyword and if there are, to delete them. ...
How to iterate over the files of a certain directory, in Java?
How to iterate over the files of a certain directory, in Java? > [Best way to iterate through a directory in java?](https://stackoverflow.com/questions/3154488/best-way-to-iterate-through-a-directory...
Loop code for each file in a directory
Loop code for each file in a directory I have a directory of pictures that I want to loop through and do some file calculations on. It might just be lack of sleep, but how would I use PHP to look in a...
- Modified
- 27 May at 17:8
Unit tests for code accessing ActiveDirectory
Unit tests for code accessing ActiveDirectory What's the best way to unit test an application accessing the ActiveDirectory and/or mock the dependencies to the AD? All the required types such as `Dire...
- Modified
- 18 May at 08:17
How to find all links / pages on a website
How to find all links / pages on a website Is it possible to find all the pages and links on ANY given website? I'd like to enter a URL and produce a directory tree of all links from that site? I've l...
- Modified
- 6 Mar at 00:18
What is the current directory in a batch file?
What is the current directory in a batch file? I want to create a few batch files to automate a program. My question is when I create the batch file, what is the current directory? Is it the directory...
- Modified
- 4 Apr at 08:49
List all files and directories in a directory + subdirectories
List all files and directories in a directory + subdirectories I want to list every file and directory contained in a directory and subdirectories of that directory. If I chose C:\ as the directory, t...
- Modified
- 11 Apr at 00:57
How can I get DOMAIN\USER from an AD DirectoryEntry?
How can I get DOMAIN\USER from an AD DirectoryEntry? How can I get the Windows user and domain from an Active Directory DirectoryEntry (SchemaClassName="user") object? The user name is in the sAMAccou...
- Modified
- 5 Jun at 14:17
How to keep the shell window open after running a PowerShell script?
How to keep the shell window open after running a PowerShell script? I have a very short PowerShell script that connects to a server and imports the AD module. I'd like to run the script simply by dou...
- Modified
- 20 Jan at 13:49
Case sensitive Directory.Exists / File.Exists
Case sensitive Directory.Exists / File.Exists Is there a way to have a case sensitive `Directory.Exists` / `File.Exists`since and both return `true`? Most of the time it doesn't matter but I'm using a...
- Modified
- 24 Apr at 05:8
Check folder size in Bash
Check folder size in Bash I'm trying to write a script that will calculate a directory size and if the size is less than 10GB, and greater then 2GB do some action. Where do I need to mention my folder...
How do I delete a directory with read-only files in C#?
How do I delete a directory with read-only files in C#? I need to delete a directory that contains read-only files. Which approach is better: - Using `DirectoryInfo.Delete()`, or,- `ManagementObject.I...
- Modified
- 13 Aug at 11:42
What are the ways to make an html link open a folder
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 acces...
How do I retrieve all filenames in a directory?
How do I retrieve all filenames in a directory? How do I retrieve all filenames matching a pattern in a directory? I tried this but it returns the full path instead of the filename. Do I have to manua...
Listing all the folders subfolders and files in a directory using php
Listing all the folders subfolders and files in a directory using php Please give me a solution for listing all the folders,subfolders,files in a directory using php. My folder structure is like this:...
Get members of Active Directory Group and check if they are enabled or disabled
Get members of Active Directory Group and check if they are enabled or disabled What is the fastest way to get a list of all members/users in a given AD group and determine whether or not a user is en...
- Modified
- 30 Aug at 11:8
What is the alternative for ~ (user's home directory) on Windows command prompt?
What is the alternative for ~ (user's home directory) on Windows command prompt? I'm trying to use the command prompt to move some files, I am used to the linux terminal where I use `~` to specify the...
- Modified
- 13 Nov at 03:9
If a folder does not exist, create it
If a folder does not exist, create it I use a `FileUploader` control in my application. I want to save a file to a specified folder. If this folder does not exist, I want to first create it, and then ...
How to get the current working directory using python 3?
How to get the current working directory using python 3? When I run the following script in IDLE I get output as but when I run from cmd prompt, I get How do I get same result which I got using IDLE ?
- Modified
- 9 May at 13:4
Multiple file-extensions searchPattern for System.IO.Directory.GetFiles
Multiple file-extensions searchPattern for System.IO.Directory.GetFiles What is the syntax for setting as `searchPattern` on `Directory.GetFiles()`? For example filtering out files with and extensions...
- Modified
- 12 Aug at 12:7
How to get folder directory from HTML input type "file" or any other way?
How to get folder directory from HTML input type "file" or any other way? So I have a basic form input with the type `"file"` however I want the user to be able to select a folder location and not a f...