Top "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 kept and organized.

Deleting folders in python recursively

I'm having a problem with deleting empty directories. Here is my code: for dirpath, dirnames, filenames in os.walk(dir_…

python directory
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 …

matlab file recursion file-io 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? …

ruby directory filesystems
The way to check a HDFS directory's size?

I know du -sh in common Linux filesystems. But how to do that with HDFS?

hadoop command-line directory hdfs
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, …

c# directory
How to copy in bash all directory and files recursive?

I have script: find ./SourceFolder/ -maxdepth 4 -exec cp -R '{}' ./DestFolder/ \; SourceDir contains also sub-folders. Problem that in DestFolder …

bash copy directory
How to reliably open a file in the same directory as a Python script

I used to open files that were in the same directory as the currently running Python script by simply using …

python directory
To show only file name without the entire directory path

ls /home/user/new/*.txt prints all txt files in that directory. However it prints the output as follows: [me@…

shell unix directory ls
Get folder name of the file in Python

In Python what command should I use to get the name of the folder which contains the file I'm working …

python python-3.x directory
deleting folder from java

In Java, I want to delete all the contents that are present in a folder which includes files and folders. …

java file directory