doudi8298 2017-02-02 19:41
浏览 22

Powershell downloadFile with special characters

I have this bit of powershell code that is ran during a batch script.

powershell -Command "(New-Object Net.WebClient).DownloadFile('http://example.com/otherdb/modelfinder/form.php?model=%model%&os=%ver%&graphics=%gpu%&hdd=%hdd%&ram=%ram%&processor=%processor%&actualmodel=!realmodel!&Implement=0&UPC=!realupc!&otherIdentifier=!identifier!', 'save.txt')"

This basically passes information to my server which then puts it in a database.

The problem is, sometimes the variables that this passes contain characters like + and #, which can drop the rest of the variable or just skip that character since it is passed in the URL.

Is there any way around this? I need the information to be stored in the database exactly as it is reported by the batch script.

--Edit it has come to my attention that this may be an issue with my php sided script. Is there any way to ignore characters like # or + being in a GET variable, but keeping it in tact?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料