darkoperator / darkoperator/Posh-SSH

Get-SFTPChildItem

Open
#441 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.1k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

When I run 'Get-SFTPChildItem -SFTPSession $Session -Path $Path' it also captures the entire directory folder and parent folder. I end up with the entire parent folder, then the folder I'm in, then all the files I was actually looking for.

I use this command to pipe the items I need to download to the 'Get-SFTPItem' command

Any idea what's going on here , I did try -recursive but I would prefer to preserve the folder structure if a bunch of files are added.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Get-SFTPChildItem -SFTPSession $Session -Path $Path and inspect how its output is passed to Get-SFTPItem. Determine whether directory and parent-folder entries are included unintentionally, then verify that the resulting items preserve the requested folder structure without unwanted entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.