# How can we limit the number of file using rclone copy

**URL:** <https://forum.rclone.org/t/how-can-we-limit-the-number-of-file-using-rclone-copy/33893>\
**Category:** Help and Support\
**Created:** [November 4, 2022, 5:20pm UTC](https://forum.rclone.org/t/how-can-we-limit-the-number-of-file-using-rclone-copy/33893 "2022-11-04T17:20:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rssgreystone](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rssgreystone](https://forum.rclone.org/u/rssgreystone)\
**Post date:** [November 4, 2022, 5:20pm UTC](https://forum.rclone.org/t/how-can-we-limit-the-number-of-file-using-rclone-copy/33893/1 "2022-11-04T17:20:31Z")

</div>

We are pulling files from vendor's s3 bucket using rclone copy. There are about 5k files I am interested in only getting 100 files. Doesn't matter which 100 files it picks.  
I am using this syntax  
rclone copy --ignore-checksum --no-traverse --verbose .........................  
I tried using  
rclone copy --ignore-checksum --transfers=100 --no-traverse --verbose ........  
it copied a bunch of 100 at a time but I am only interested 100 files and stop the copy  
What parameter can I add to get the required result?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 4, 2022, 5:25pm UTC](https://forum.rclone.org/t/how-can-we-limit-the-number-of-file-using-rclone-copy/33893/2 "2022-11-04T17:25:15Z")

</div>

hello and welcome to the forum,

one way

1. `rclone ls source: > list.lst`
2. take the top 100 lines from `list.lst` and save it as `short.lst`
3. `rclone copy source: dest: --files-from=short.lst`

---

<div class="post-metadata">

**Author:** ![rssgreystone](https://forum.rclone.org/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rssgreystone](https://forum.rclone.org/u/rssgreystone)\
**Post date:** [November 4, 2022, 5:30pm UTC](https://forum.rclone.org/t/how-can-we-limit-the-number-of-file-using-rclone-copy/33893/3 "2022-11-04T17:30:34Z")

</div>

Are there any options/parameters that I can add to rclone which would limit to 100 files

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 4, 2022, 5:38pm UTC](https://forum.rclone.org/t/how-can-we-limit-the-number-of-file-using-rclone-copy/33893/4 "2022-11-04T17:38:01Z")

</div>

not that i know of,

this would work  
`rclone lsf ./source --absolute --files-only | head -100 | rclone copy ./source ./dest --files-from=-`

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [December 4, 2022, 5:38pm UTC](https://forum.rclone.org/t/how-can-we-limit-the-number-of-file-using-rclone-copy/33893/5 "2022-12-04T17:38:47Z")

</div>

Closed on December 4, 2022, 5:38pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
