I am wanting to get the list of files that are in a specific folder in that document library using powershell CSOM     Tried this but it didnt work saying it didnt recognise getfolder  $folder = $list.ParentWeb.GetFolder($web.Url + "/" + $list.RootFolder.Url + "/" + $foldername) foreach ($item in $folder.Files) {    Write-Host $item.Name }
122156
I there anyway to output the files of a specific folder in a document library?  Listing them will be like   foreach $file in $folder.files {     write-host $file.name }    But how do I tell it to look a specific folder? In CSOM please Tried the below answer but it did not work
28721
I want to export SharePoint Online List data programmatically using CSOM code in console application.  Can anyone send me CSOM code for the same.
118462
In a GUI file manager it is possible to select a few files, press Ctrl-C (which supposedly copies come info about the files to clipboard), then navigate to another folder and press Ctrl-V, which will then copy the files into that directory.  As an experiment, after copying files in the file manager, it is possible to switch to a text editor - pressing Ctrl-V there pastes a list of absolute filenames. The reverse process (copying a list of files from a text editor and pasting them to a file manager) does not work, which is supposedly due to different    The goal of the exercise is to be able to copy some files from command line, for example  find ${PWD} -name "*.txt" | xclip &lt;magic parameters&gt;   then switch to a file manager and copy them all to a directory using File->Paste.   So, the question is: What parameters of xclip (or other program) do I need to specify so file manager recognizes the selection as a list of files and enables its Paste menu item?  Alternatively, is there a low-level tool which would allow to inspect the contents of X selection and see what data it currently contains?
82189
How can I list the contents of a zipped folder in C#? For example how to know how many items are contained within a zipped folder, and what is their name?
36214
I am looking to use a workflow to move documents within a document library to a specific folder in the same document library (this to manage access rights on different documents via the libraries). Could anyone advise how I can setup a workflow to move a document to a folder? I expected this to work similar as moving documents between document libraries, but it appears to be more complex.  Appreciate your input.
3149
Is there a way to find the number of files of a specific type without having to loop through all results inn a Directory.GetFiles() or similar method? I am looking for something like this:  int ComponentCount = MagicFindFileCount(@"c:\windows\system32", "*.dll");   I know that I can make a recursive function to call Directory.GetFiles , but it would be much cleaner if I could do this without all the iterating.  EDIT: If it is not possible to do this without recursing and iterating yourself, what would be the best way to do it?
54653
I have a folder with more than 30 sub directories and I want to get the list of the files which was modified after a specified date(say sep 8 which is the real case) and to be copied with the same tree structure with only the modified files in that folder   I have say 30 dir from that I have the list of the files I need found using last modified date Find command output  a/a.txt a/b/b.txt a/www.txt etc..   For example I want the folder "a" created and only the a.txt in it...like wise for the other also "a/b" to be created and b.txt inside it...
116705
I need to search for files starting with some particular name. There can be multiple files starting with a particular pattern and I want to list all such files present in the directory.
26309
Normally, we can search a keyword in a list of pdf files using the following command:  for file in *pdf; do  pdftotext "$file" - | grep keyword done   Now, from the search result, If I want to find the title name along with the authors/writers of the file manually, without using pdfinfo command, what will I have to do?
115972
Im trying to run the following code as a powershell script,but I cant get it to work. 1st,the following works with one -Include item but I cant seem to get it to work with multiple ones. 2nd, the -Exclude perimeter doesn't seem to work. I still get files from the C:\Windows and C:\Program Files directorys .  $Include = "*.zip","*.rar","*.tar","*.7zip" $exclude = "C:\Windows","C:\Program Files" Get-ChildItem "C:\" -Include $Include -Exclude $Exclude -Recurse -Force -ErrorAction silentlycontinue | Select-Object -ExpandProperty FullName   Note: The purpose of this script is to find all compressed files on the system. I know this is probably really simple but I just cant seem to get it to work.
5122
How can I determine the list of files in a directory from inside my C or C++ code?  I'm not allowed to execute the ls command and parse the results from within my program.
79643
I wanted to know, what is the best way to use the find command efficiently?  I generally use, find [filename] [dir] which gives me a long list of file names none of them any way related to my search.  I simply need to find one file in a particular directory. What is the command for that?
43179
In Windows File Explorer, you can highlight several files and then click the "Copy path" button from the menu.  Show below is an example.  I'd then like to process these files on the command line, preferably in a PowerShell terminal.  I've tried enclosing them in more quotes, single quotes, and backticks, to no avail. Here's an example of the files copied to the clipboard:  "C:\Users\me\100_0909.jpg" "C:\Users\me\100_0521.jpg" "C:\Users\me\100_0519.jpg"  I'd like to be able to take the files above and include them in a command like:  magick "C:\Users\me\100_0909.jpg" "C:\Users\me\100_0521.jpg" "C:\Users\me\100_0519.jpg" +append new.jpg
67491
System.IO.Directory.GetFiles() returns a string[].  What is the default sort order for the returned values?  I'm assuming by name, but if so how much does the current culture effect it?  Can you change it to something like creation date?   Update: MSDN points out that the sort order is not guaranteed for .Net 3.5, but the 2.0 version of the page doesn't say anything at all and neither page will help you sort by things like creation or modification time.  That information is lost once you have the array (it contains only strings).  I could build a comparer that would check for each file it gets, but that means accessing the file system repeatedly when presumably the .GetFiles() method already does this.  Seems very inefficient.
15495
I work with a lot of folder shares, but there are a bunch of locked files which have been opened by some other process.  I need to close those files. So far I've been using MMC - System Tools - Shared Folders - Open Files.  It would be far more convenient if I could use PowerShell to filter the list/table retrieved by OpenFiles.exe and once I get the file ID close it with net file  /close, or some other PS native means to similar effect.  I am new to PowerShell, so I wonder if there is a way to create a PS script that receives the file's path and then used the file ID to close that file?
123719
I have multiple folders and sub folders in a SharePoint document library.   How to download multiple folders and subfolders from this library at once?
104493
I have Library on which I have created a ribbon button. On click of the button I am trying to identify if the selected item is a folder or a file. below if the code snippet that I am using:  var context = SP.ClientContext.get_current(); var web = context.get_web();  var items = SP.ListOperation.Selection.getSelectedItems(context);  var currentLibrary = web.get_lists().getById(SP.ListOperation.Selection.getSelectedList(context));  var index; for (index in items) {     var selectedItem = currentLibrary.getItemById(items[index].id);     // Need to identify if 'selectedItem' is folder or not     console.log("FileSystemObjectType = " + selectedItem.FileSystemObjectType); // Returns 'undefined'     console.log("get_file = " + selectedItem.get_file()); // Returns 'SP.ListItem' object     console.log("get_folder = " + selectedItem.get_folder()); // Returns 'SP.ListItem' object }   Taking reference from  I tried to use FileSystemObjectType but in my case it ends up showing undefined for both file and folder. Also if I try to check if the selected item is a file or folder using below code it always return true.  if(item.FileSystemObjectType == SP.FileSystemObjectType.Folder) {     // Always returns true }   What am I doing wrong here? How can I identify if the selected item in Library is a file or a folder?