Download Folder Contents But Not the Folder Itself

  • 1
  • Question
  • Updated 11 months ago
I've hit another snag on my file transfer PowerShell script.

I need to DOWNLOAD the files within a ShareFile folder to a folder of the same name on our server.  Problem the command is creating another subfolder of the same name within the folder on the server, so it's ending up as *\Directory\Folder\Folder.  I don't want the "Folder" subfolder.

I've seen many discussions of using the asterisk wildcard on local drive locations, when UPLOADING files to ShareFile.  But it doesn't seem to work for DOWNLOADING.

I'm using: Sync-SfItem -ShareFilePath "/ProjectPath/Folder" -Synchronize -Download -LocalPath "D:\Shares\Projects\Project Path\Folder" -Overwrite

which results in D:\Shares\Projects\Project Path\Folder\Folder.  I only want the files inside "folder", not the entire folder itself.

Photo of patrick94gsr


  • 5 Posts
  • 1 Reply Like

Posted 11 months ago

  • 1

Be the first to post a reply!