List all files in a folder and sub folders into a table

Sunil Babu Vudimudi

Have a folder with sub folders and with various source code files withing those sub folders like .CSS, .java etc. Is it possible to list all these source code files into a table format with two columns(path and filename)

all_files<-list.files(pattern = "*.*", recursive = TRUE) is not working. I tried other functions like lapply cant seem to catch a break.

hrbrmstr
fils <- list.files("thedir", recursive = TRUE)

data.frame(
  path = dirname(fils),
  file = basename(fils),
  stringsAsFactors = FALSE
)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

list all files in the folder and also sub folders

Command to list all files in a folder as well as sub-folders in windows

Set namespace on all files in folder and sub folders

Find and list all files/folders in a folder in Haxe

Xampp htdocs folder, sub folders and all files permission

Move all files inside sub folders to parent folder

Renaming all the files in a folder is renaming the sub folders too

Delete all files from a folder and its sub folders

Batch. Mass renaming files in the folder and all sub-folders

Get a list of all files in folder and sub-folder in a file

Recursively cleanup all folders and sub-folders in a folder that have no files in them

how to print list of sub-folders and number files in each sub-folder side by side, in the current directory?

List of All Folders and Sub-folders

Spring Batch how to read all json files from a folder and all its sub-folders using PathMatchingResourcePatternResolver

Search multiple files in folder and sub folders python

Find number of files in folder and sub folders?

Viewing all messages in sub folders in the containing folder?

.gitignore, exclude all files in a folder... but keep those sub-folders with a .gitkeep inside it?

How to delete all files in particular folder present in current directory sub-folders excluding a certain file?

How to lock cells for all files in a folder which has sub-folders

Recursively read files from sub-folders into a list and merge each sub-folder's files into one csv per sub-folder

How to download HTTP directory with all files and sub-directories as they appear on the online files/folders list?

How to list all 'files with path' in a windows directory, including all sub-folders in Python?

Getting list of all folders but not the files

Command that deletes all old files, folders and sub-folders

Github does not display all the folders, sub-folders, and files

Batch File To List All Movie Files In Sub-Folders Named #, A, B, C, D, thru Z

Moving all files of nested folders to other folder

How do i get a list of folders and sub folders without the files?