Sync-sfitem copies folders - not just files

  • 1
  • Question
  • Updated 1 year ago
I am trying to move files one way from ShareFile to local folders. The following command also copies the CITYSUBFOLDER from ShareFiles to the local as CITY\CITYFOLDER\CITYSUBFOLDER . I would like for only the files to move.

Sync-SfItem -ShareFilePath "/city/citySubFolder/" -Download -LocalPath "Local:\City\cityFolder" -Move -KeepFolders -OverWrite
Photo of Tom Hanley

Tom Hanley

  • 1 Post
  • 0 Reply Likes

Posted 1 year ago

  • 1
Photo of Zack Eleveld

Zack Eleveld

  • 22 Posts
  • 4 Reply Likes
What exactly are you trying to do.  It seems that you are expecting that leaving off the -Recursive option that you are expecting it to only move the files and not folders.  I've never tried that.  It seems weird that you would want to download the files in a folder and delete the folder contents afterwards, but not download the subfolders.

Alternatively, you could try to list the remote files (and not folders) in the directory and then download the files one by one.