We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.

Forum Discussion

Rodney2024's avatar
Rodney2024
New member | Level 2
5 months ago

Changes to shared links stopped me from downloading them in Windows Powershell

I run a few radio stations and often use Windows Powershell to download show content from Dropbox. I prefer to do it this way because I do things such as change the file names, reorganize multiple files and move them to the correct folders for the broadcast software. This also makes sure that the show content is downloaded and ready to be aired even when no one is in the studio to do it manually.

 

This is an example of the command I use in a .bat file:

 

set _wdraft=%~dp0\playback\TheNameOfTheShow.mp3
set _dlwebf="[Removed as per Community Guidelines]
Powershell -Command "(New-Object Net.WebClient).DownloadFile('%_dlwebf%','%_wdraft%')" >NUL

 

That is using an old link, however the latest links do not work using this method.

 

Any suggestions?

 

 

  • Okay adding the ^ in front of the & solves the problem

  • Jay's avatar
    Jay
    Icon for Dropbox Staff rankDropbox Staff

    Hi Rodney2024, thanks for bringing this to our attention.

     

    Are you certain that you're using the whole link? Newer shared links have an rlkey that needs to be included when accessed.

     

    This will help me to assist further!

    • Rodney2024's avatar
      Rodney2024
      New member | Level 2

      Yes the new link will work in a browser but not in the same Powershell command and yes I use the entire link only changing the dl_ value from 0 to 1

       

       

      • Rodney2024's avatar
        Rodney2024
        New member | Level 2

        Looks like the url becomes broken. It added spaces around the &  

         

        Powershell -Command "(New-Object Net.WebClient).DownloadFile('"db link  & st=1nk3hwsd & dl=1"','B:\DropBox Download Tool\\WORK\NewLinkTest2024.zip')" 1>NUL
        The string is missing the terminator: '.
        + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

        'st' is not recognized as an internal or external command,
        operable program or batch file.
        'dl' is not recognized as an internal or external command,
        operable program or batch file.

About View, download, and export

Need support with viewing, downloading, and exporting files and folders from your Dropbox account? Find help from the Dropbox Community.

Need more support

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!