Most voted "directory" questions
A directory or folder is a virtual container within a digital file system, in which groups of computer files and other directories can be saved and organized. related tags that may be more suitable in some situations: [file], [folder], [sub-directory], [directory-structure], [working-directory], [directory-listing], [directory-permissions]
Learn more…106 questions
Sort by count of
-
19
votes2
answers234
viewsHow to reference the current board
As an example, using the variable SCRIPT_FILENAME we can get the requested file, but for this problem we want to get the directory where the file is .htaccess: # Rewrite the url <IfModule…
-
16
votes1
answer10823
viewsWhat are the most files I can have in a folder?
I’m developing a web application to run on linux. In my project the visitor of my site can send images as many times as he wants. My image upload folder structure will be separated by year/month.…
-
13
votes1
answer5489
viewsHow to create directory with a path that works for any OS?
I am doing a job in Java and I need my program to create a directory in the user’s "home" folder, but it needs to be able to create both in Linux and Windows. It is possible to create a "generic"…
-
12
votes5
answers15940
viewsHow to create a directory in Python?
How can I use Python to create a certain directory? For example: app/ main.py How could I create a directory called temp inside app through Python main.py?…
-
11
votes5
answers1562
viewsOptimize function to include classes also looking in sub-directories
I have the following function to include classes when we are trying to use a class that has not yet been defined: /** * Attempt to load undefined class * @param object $class_name object class name…
-
11
votes1
answer28766
viewsList files from a PHP folder / directory of certain extensions
I need to list the files of a folder, and display them by name linked to his directory for download. I use that code: $pasta = 'uploads/'; $arquivos = glob("$pasta{*.jpg,*.JPG,*.png,*.gif,*.bmp}",…
-
11
votes1
answer332
viewsHow to know if path exists?
One of the classes of my system is created with the information of a file. When starting the system, it initially runs the following lines: public List<Estabelecimento>…
-
9
votes4
answers2855
viewsHow to merge multiple text files into one?
Does anyone know how to select all text files from the same directory and join the information of all of them in just one final text file? Example: In folder X, I have files 1.txt, 2.txt and 3.txt.…
-
9
votes3
answers1558
viewsLast folder of a directory
How do I get the last folder from a directory. Ex: C:\Program Files\Skype The last folder would be Skype.
-
8
votes1
answer3788
viewsZipping directory with PHP
I have a code that compacts file and directory. The problem is that it compresses the files and directories that are at the root, but the subdirectories they are not compressed, for example I have…
-
8
votes1
answer95
viewsHow not to ignore directories with the same name?
I have the following structure: nbproject public_html build index.min.html style.min.css index.html style.html build dist Man .gitignore to ignore the Netbeans configuration files is like this:…
-
8
votes1
answer112
viewsCan you use a dialog to open both folders and files?
Well, I’m using the openfiledialog to open files, however the software needs to receive files or folders, because it compressed and zipped (.zip) and then make a symmetrical cipher. I have searched…
-
7
votes2
answers821
viewsIn Python, how to get the default temporary directory?
I am making a program that uses a temporary file to save a serialized object (pickled). At the moment, the program is generating in the /tmp, but this path is specific to Unix/Linux; wanted to take…
-
7
votes4
answers12949
viewsReturn Array with name of all files in directory
I need my HTML5 page to return a Array with all existing file names and extensions in a directory within my site. I can do this in other server-side languages, but I would like to do it in JS. there…
-
7
votes1
answer5068
viewsProject directory list in Laravel is displayed instead of running the application
I would like your help to know why my PHP project with Laravel Framework does not work, I did all the steps correctly, but instead of seeing the framework, I am seeing your folders…
-
6
votes3
answers134
viewsPrevent script from following symbolic links
With the script below, a search is carried out for all the accommodations in the indicated directory in order to obtain the email addresses associated with each accommodation: #!/bin/bash # Scan All…
-
6
votes2
answers180
viewsBash, know what board you’re running on
How do I get the path to the directory in which the script in bash is located within the script? #!/bin/bash MINHADIR="caminho/para/onde/estou" # apanhar a diretoria onde estou atualmente…
-
5
votes3
answers2406
viewsAccess content from another project in the same Solution
Here’s the thing: I have a Solution with two Projects, one Administrative and one Website, both using C# and MVC4. In the first project I save images and files in a folder Documents, and when…
-
5
votes3
answers287
viewsOut Of Memory when running a Getfiles in a very large directory
Currently I have a directory with several subdirectories that have more than 3 million files. I need to map only the directory where these files are. And this mapping should be separated by the file…
-
4
votes2
answers2564
viewsSearch for file in directory
I have a directory on the network with thousands of TXT files generated by another software hired in the company. The file is named with the following logic: (cpf do cliente)(data da insercao)(hora…
-
4
votes1
answer964
viewsHow to create a Java directory using NIO.2 - Java SE 7
The API java. is part of the Java SE platform since its version 1.4. Now, from Java 7, we have several new Enhancements in this API and new features, which provide better management of the file…
-
4
votes3
answers1923
viewsHow to fetch a file in all folders
How to create an application that does a full search in a folder or disk looking for a file who in the image I’ve tried to use Directory.GetFiles and Directory.GetDirectory But when it gets to a…
-
4
votes2
answers1581
viewsFolder browsing in PHP
I have a few folders in my project and I need to go through them all keeping the name of the mother, daughter, and her files folder... The parent folder is "Manual", inside it I have other folders…
-
4
votes1
answer715
viewsFile comparison
I need to compare files from different directories and show the differences. But I don’t want to list the name of the files, I just want you to make a comparison of the directories and show the…
-
4
votes1
answer76
viewsIs it possible to delete "C:" using Directory.Delete?
Using Directory.Delete("C:", true) deletes partition? Or it is just locked and does not run?
-
3
votes4
answers8851
viewsFull Python file path
I’m using the method os.listdir() to return a list of all the files, however the return is only the file name and I would like it to return the absolute path, someone knows some way ? The method…
-
3
votes1
answer650
views"Listen" directory using Java
I am working on an application, and I need to create a functionality, as a method, that is "listening", given directory. The directory is used as a destination for *.xlsx file uploads. I need that…
-
3
votes2
answers907
viewsHow to count . xls / . xlsx files in folder with C#?
I have a Folderbrowserdialog and when I select the folder it shows the amount files (all, no filter). How do I do this length only with Excel files (.xls, . xlsx). Follow the code below:…
-
3
votes3
answers4129
viewsDirectory problems
I am trying to read a file . html but I cannot get the path of this file. I have already used Environment.GetCurrentDirectory and Directory.GetCurrentDirectory but did not succeed. Below follows…
-
3
votes1
answer63
views -
3
votes1
answer2440
viewsShould I use DIRECTORY_SEPARATOR or BARRA (/)?
I often fiddle with frameworks source code, as in the case of Laravel to see how the structures are made. I noticed something interesting in Laravel 4 in relation to the Laravel 3. In the Laravel 3,…
-
3
votes2
answers730
viewsWhat better option to protect directories and files in a root folder?
On a web server, I have a folder inside the root folder (public_html) that must be protected. It contains system files, settings, logs, classes and etc... In general, what is the best option to…
-
3
votes2
answers84
viewsReturn the path value
To return the value with the name of a folder in C#? Example, if executed: Directory.GetFiles("%PROGRAMFILES% (x86)\MyApp", "*.*", true); And if he succeeds he returns like this: %PROGRAMFILES%…
-
3
votes0
answers1247
viewsList directory by network
I am using the code below to read files: Locally it works, but when I put the variable $dir with a network path, as below, I get error: $dir = "W:/_Infraestrutura/Controles/Inventario de…
-
3
votes3
answers460
viewsHow do I create a directory through the Harbour language?
How do I create a directory through the Harbour language? For example, I want to create a folder temp within the current directory from which the program is running.
-
3
votes1
answer566
viewsHow does [modus operandi] autoload in PHP work?
Suppose I have the following file structure at the root of my site: index.php autoload.php ----| /Models --------| /MainModel ------------| MainModel.php ----| /Controllers --------| /MainController…
-
3
votes1
answer1172
viewsWhat are file descriptors and directories?
I’m studying the módulo os of the standard library of Python and I realize that in many cases a function is allowed to receive as a parameter a descritor de arquivo ou diretório some examples are:…
-
2
votes2
answers160
viewsWhat is the difference between open and opendir calls on UNIX?
If the open file uses the open system call, why is there another system call to open files directory (opendir), if a directory is a file type? It wasn’t supposed to be a call just for all kinds of…
-
2
votes2
answers230
viewsHow to verify if a file name has 16 digits?
namespace _06_Teste { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void cmdValidar_Click(object sender, EventArgs e) { foreach (String file in…
-
2
votes1
answer214
viewsAllow access to other directories with . htaccess
I have a Wordpress site installed at the root and a service order manager in a folder called /Sistema. The problem is, when I type www.meudominio.com.br/sistema/, is redirecting to the page 404…
-
2
votes2
answers3701
viewsGet directory from server
How can I get the directory where the server is located using PHP? The directory of the server and not the file where the script
-
2
votes0
answers192
viewsIt is possible to delete a file if there is no reference from it in the database using mysql
I wonder if anyone knows any way to create a "trigger" in Mysql that when deleting a table value, delete a file together on the server, for example: Excludes the item from tbl_imagens whose name is…
-
2
votes2
answers1387
viewsList Folders and Subfolders of an FTP with C#
Would anyone know if it is possible, if yes, how to list all folders and subfolders of a FTP? Okay, here’s the idea. I’m listing all the Files and Directories in this FTP, but different from…
-
2
votes1
answer1011
viewsMove all files with the . prj extension to a folder
I would like to know whether the following situation is possible: There are several folders inside each other... and within them there are files with the extension .prj. It is possible to read all…
-
2
votes2
answers72
viewsIs it possible to upload an image and rename it only with Java Script?
Have some way to grab the image file of the request, save it in some directory and change the name of the server using JavaScript? Obs: It can be either way, or use any framework (AngularJS, jQuery)…
-
2
votes1
answer62
viewsPHP Find directory stating part of directory name
Hello! I already have a prototype application running in PHP, where I access photos from a given directory. However, the directories were not very friendly, for example: 2016/783/01/2016-07-26-00001…
-
2
votes1
answer3547
viewsWhat does vendor mean?
A folder with a name vendor is commonly used in web projects. See some examples: rklet, ytd. What is the purpose and importance of this folder? Why does it have that name?…
-
2
votes2
answers1187
viewsWhat is the purpose of the Assets directory?
I’m starting to learn about Unity, and in my first project I came up with a question about the directory Assets. It contains some files that are C# game scripts, and other extension files *.asset…
-
2
votes2
answers73
viewsCreate folder on every console usage
I took a program ready on the internet to create folder, so I tried to adapt it for me but I’m not getting. I’d like every time I executed it, to create a subfolder inside the main under a different…
-
2
votes1
answer352
viewsHow to separate the name of packages in the Intellij IDEA directory tree?
I am using Intellij IDEA to program in Java and want to create several packages inside each other, where each of them will contain classes and other file types. The problem is that when creating…