Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 如何在命令promt上从internet调用批处理文件?_Batch File_Cmd - Fatal编程技术网

Batch file 如何在命令promt上从internet调用批处理文件?

Batch file 如何在命令promt上从internet调用批处理文件?,batch-file,cmd,Batch File,Cmd,我已将批处理文件代码上载到internet。我想知道我是否可以在cmd上从我的计算机运行这个批处理文件(现在在互联网上)。有这样的命令吗?我真的不知道如何才能做到这一点。您必须先下载它。您可以使用: call winhhtpjs.bat https://example.com/mybat.bat -saveTo "%cd%\mybat.bat" call mybat.bat 或使用bitsadmin(默认情况下并非每个窗口都有): 您可以查看有关如何下载文件的更多选项您可以使用powersh

我已将批处理文件代码上载到internet。我想知道我是否可以在cmd上从我的计算机运行这个批处理文件(现在在互联网上)。有这样的命令吗?我真的不知道如何才能做到这一点。

您必须先下载它。您可以使用:

call winhhtpjs.bat https://example.com/mybat.bat -saveTo "%cd%\mybat.bat"
call mybat.bat 
或使用bitsadmin(默认情况下并非每个窗口都有):


您可以查看有关如何下载文件的更多选项

您可以使用powershell和batch下载文件,然后按以下方式启动:

@echo关闭
设置“url”=http://hackoo.alwaysdata.net/Matrix.mp3"
设置“FileLocation=%userprofile%\Desktop\Matrix.mp3”
请稍等。。。正在下载文件。。。
调用:PSDownload“%url%”“%FileLocation%”
启动“”%FileLocation%“
退出/b
::*********************************************************************************
:ps1下载
Powershell.exe-命令“(新对象系统.Net.WebClient)。下载文件('%1','%2')”
退出/b
::********************************************************************************* 

只需将URL和FileLocation变量更改为您的,并对其进行测试;)

你把文件上传到哪里了?
bitsadmin /transfer myDownloadJob /download /priority normal https://example.com/mybat.bat "%cd%\mybat.bat"
call mybat.bat