directory-listing

How can I list all the files in folder on tomcat?

笑着哭i 提交于 2019-11-27 04:19:24
问题 I have got a folder with many excel documents in it on tomcat and i want those files to be available when i got go the that folder's url in the browser (eg http;//localhost:8080/myfolder) at the moment when i try to access a folder i get a 404 error. by if i try to access a file that is in that folder, it works. 回答1: The DefaultServlet of Tomcat is by default configured to not show directory listings. You need to open Tomcat's own /conf/web.xml file (look in Tomcat installation folder),

Get the contents of a server-side directory in SAP ABAP

隐身守侯 提交于 2019-11-27 03:31:03
问题 I need to get a listing of a server-side directory inside SAP. How do I achieve this in ABAP? Are there any built-in SAP functions I can call? Ideally I want a function which I can pass a path as input, and which will return a list of filenames in an internal table. 回答1: After reading the answers of Chris Carrthers and tomdemuyt I would say: 1) Use RZL_READ_DIR_LOCAL if you need simple list of filenames. 2) EPS_GET_DIRECTORY_LISTING is more powerfull - it can also list subdirectories. Thanks

How to get the list of files in a directory in a shell script?

假装没事ソ 提交于 2019-11-26 21:42:07
I'm trying to get the contents of a directory using shell script. My script is: for entry in `ls $search_dir`; do echo $entry done where $search_dir is a relative path. However, $search_dir contains many files with whitespaces in their names. In that case, this script does not run as expected. I know I could use for entry in * , but that would only work for my current directory. I know I can change to that directory, use for entry in * then change back, but my particular situation prevents me from doing that. I have two relative paths $search_dir and $work_dir , and I have to work on both

how to iterate over non-English file names in PHP

无人久伴 提交于 2019-11-26 20:46:58
I have a directory which contains several files, many of which has non-english name. I am using PHP in Windows 7. I want to list the filename and their content using PHP. Currently I am using DirectoryIterator and file_get_contents . This works for English files names but not for non-English (chinese) file names. For example, I have filenames like "एक और प्रोब्लेम.eml", "hello 鶨鶖鵨鶣鎹鎣.eml". DirectoryIterator is not able to get the filename using ->getFilename() file_get_contents is also not able to open even if I hard code the filename in its parameter. How can I do it? Artefacto This is not

How to List Directory Contents with FTP in C#?

本秂侑毒 提交于 2019-11-26 20:29:06
How to List Directory Contents with FTP in C# ? I am using below code to List Directory Contents with FTP it is returning result in XML format ,but i want only the name of directory not the whole content. How i Can do that ? public class WebRequestGetExample { public static void Main () { // Get the object used to communicate with the server. FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://www.contoso.com/"); request.Method = WebRequestMethods.Ftp.ListDirectoryDetails; // This example assumes the FTP site uses anonymous logon. request.Credentials = new NetworkCredential (

Get a filtered list of files in a directory

别说谁变了你拦得住时间么 提交于 2019-11-26 19:24:41
I am trying to get a list of files in a directory using Python, but I do not want a list of ALL the files. What I essentially want is the ability to do something like the following but using Python and not executing ls. ls 145592*.jpg If there is no built-in method for this, I am currently thinking of writing a for loop to iterate through the results of an os.listdir() and to append all the matching files to a new list. However, there are a lot of files in that directory and therefore I am hoping there is a more efficient method (or a built-in method). glob.glob('145592*.jpg') glob.glob() is

Vbscript list all PDF files in folder and subfolders

妖精的绣舞 提交于 2019-11-26 16:51:33
问题 Well here is my code but I just can not filter the listing using the objFile.Extension i am sure it is some thing silly Set objFSO = CreateObject("Scripting.FileSystemObject") objStartFolder = "C:\dev" Set objFolder = objFSO.GetFolder(objStartFolder) Wscript.Echo objFolder.Path Set colFiles = objFolder.Files For Each objFile in colFiles If objFile.Extension = "PDF" Then Wscript.Echo objFile.Name End If Next Wscript.Echo ShowSubfolders objFSO.GetFolder(objStartFolder) Sub ShowSubFolders(Folder

Non-alphanumeric list order from os.listdir()

不打扰是莪最后的温柔 提交于 2019-11-26 11:19:51
I often use python to process directories of data. Recently, I have noticed that the default order of the lists has changed to something almost nonsensical. For example, if I am in a current directory containing the following subdirectories: run01, run02, ... run19, run20, and then I generate a list from the following command: dir = os.listdir(os.getcwd()) then I usually get a list in this order: dir = ['run01', 'run18', 'run14', 'run13', 'run12', 'run11', 'run08', ... ] and so on. The order used to be alphanumeric. But this new order has remained with me for a while now. What is determining

How to get the list of files in a directory in a shell script?

。_饼干妹妹 提交于 2019-11-26 09:06:53
问题 I\'m trying to get the contents of a directory using shell script. My script is: for entry in `ls $search_dir`; do echo $entry done where $search_dir is a relative path. However, $search_dir contains many files with whitespaces in their names. In that case, this script does not run as expected. I know I could use for entry in * , but that would only work for my current directory. I know I can change to that directory, use for entry in * then change back, but my particular situation prevents

how to iterate over non-English file names in PHP

我的梦境 提交于 2019-11-26 09:03:17
问题 I have a directory which contains several files, many of which has non-english name. I am using PHP in Windows 7. I want to list the filename and their content using PHP. Currently I am using DirectoryIterator and file_get_contents . This works for English files names but not for non-English (chinese) file names. For example, I have filenames like \"एक और प्रोब्लेम.eml\", \"hello 鶨鶖鵨鶣鎹鎣.eml\". DirectoryIterator is not able to get the filename using ->getFilename() file_get_contents is also