Questions tagged [directory]

A directory or folder is a virtual container within a digital file system, in which groups of computer files and other directories can be kept and organized.

A directory or folder is a virtual container within a digital file system, in which groups of computer files and other directories can be kept and organized.

A typical file system may contain thousands (or even hundreds of thousands) of directories. Files are kept organized by storing related files in the same directory. A directory contained inside another directory is called a subdirectory or child of that directory. Together, the directories form a hierarchy, or tree structure.

Related

17729 questions
5
votes
2 answers

Creating a directory wherever jar file is located through java

I have already surveyed SO for an answer, and could not find an appropriate one. When I launch my program from a jar I need to create a folder in the directory where the jar file is located. It should not matter where the user saves the jar…
Michael Scott
  • 409
  • 1
  • 7
  • 17
5
votes
2 answers

How can I browse a local virtual folder in C#?

In my C# program I have to browse directories. So I use the method System.IO.Directory.GetFiles(directory) and it works well when directory is a real directory like "C:\Program File" but when it's a virtual directory (eg: librairie directory),…
Akhilleus
  • 197
  • 2
  • 11
5
votes
6 answers

PHP count total files in directory AND subdirectory function

I need to get a total count of JPG files within a specified directory, including ALL it's subdirectories. No sub-sub directories. Structure looks like this : dir1/ 2 files subdir 1/ 8 files total dir1 = 10 files dir2/ 5 files …
Neoweiter
  • 696
  • 1
  • 8
  • 17
5
votes
2 answers

"SelectFolderDialog" in .NET

There is no SelectFolderDialog in .NET but It is present itself in Visual Studio 2010. I was wondering if there is any external .net component like this form. Here is the VS2010 Dialog : Please Note that I dont want to use the FolderBrowserDialog…
Writwick
  • 2,045
  • 5
  • 21
  • 52
5
votes
4 answers

PHP script to traverse directory/file tree and output tree as nested ULs

I have a tree of directories, sub-directories, and files (in some but not all the directories). Here's an example of the whole…
user743094
  • 309
  • 1
  • 6
  • 19
5
votes
1 answer

Create an admin-only accessible directory

I have an admin app that runs with elevated privileges and I need it to store some sensitive files in a directory that only system administrators can access. It probably has to do with the following call but I am not sure how to configure…
Raheel Khan
  • 13,199
  • 12
  • 71
  • 154
5
votes
1 answer

Opening file from directory in ruby using File.open

I am relatively new to Ruby, I am trying to open a file in a way like: #! /usr/bin/env ruby data_file = '~/path/to/file.txt' file = File.open(data_file, 'r') however I get "No such file or directory" (the file does exist in that directory). It…
user1368596
5
votes
7 answers

What is the easiest way to track a change in a folder in Java?

I have a set of source folders. I use a Java class to build the distribution file out of these folders. I'd like to write another little class in Java which runs every half a second, checks if any of the files in the folders have changed, and if…
glmxndr
  • 42,138
  • 27
  • 90
  • 115
5
votes
5 answers

How to relocate Netbeans' %USERPROFILE%\.m2 directory?

I can move the .netbeans directory from my user directory but I cannot find how to move the .m2 directory. Changing Netbeans'user home worked on 7.0.1, but now I upgraded to 7.1.1 and the same configuration changes as before aren't cutting it. Is…
5
votes
1 answer

Tridion 2009 - Retrieve Component's parent folder TCM

Quick question. I'm building a Template Building Block (TBB) that retrieves metadata schema values from the parent folder of components. For example, all of the components listed in this folder will share the same title, but have different content.…
Helldozer
  • 65
  • 4
4
votes
2 answers

When using Perl's File::Find what's a quick & easy way to limit search depth?

I want to be able to limit Perl's File::Find to a directory depth (below the specified search) to the specified directory and 1 & 2 subdirectories beneath it. I want to be able to enumerate the files at the same time, if this is possible. It must…
unixman83
  • 8,261
  • 10
  • 62
  • 98
4
votes
3 answers

How to access a Image file in a Eclipse Project Folder

I have a single image file in a folder in my Eclipse project that stores a image file (logo.jpg). However I don't know how to access it in my main program. I had tried the following private static URL logoPath public class MainApplication { …
StephenHynes
  • 53
  • 1
  • 1
  • 5
4
votes
1 answer

Deleting subdirectories and files in a given directory

I want to delete all subdirectories and files from a directory, but not the directory itself. For examnple, if I pass "Sample" directory in a variable, and "Sample" directory contains three subdirectories and 3 files, I want to delete all that 3…
Shaggy
  • 101
  • 5
  • 11
4
votes
1 answer

VBA - Identifying whether a string is a file, a folder or a web url

I need to perform a number of actions, initiated by the passing of a string, with the course of actions depending on whether the string is a file, a folder or a web url. FYI - for a file I copy the file to a repository, for a folder I am making a…
FrugalTPH
  • 513
  • 1
  • 5
  • 21
4
votes
3 answers

Scala - Remove files from folder by file suffix name

I'm looking for an elegant way to remove all files in a folder that have the extension .jpg I have the following to count the total jpg files in a folder: Option(new File(path).list).map(_.filter(_.endsWith(".jpg")).size).getOrElse(0) Thanks in…
jhukdev
  • 3,051
  • 4
  • 30
  • 45
1 2 3
99
100