Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.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 使用批处理文件从url复制文本_Batch File - Fatal编程技术网

Batch file 使用批处理文件从url复制文本

Batch file 使用批处理文件从url复制文本,batch-file,Batch File,我想知道是否有任何方法可以将原始pastebin页面的内容复制到批处理: example : https://pastebin.com/raw/J5xb0eUX 然后使用echo命令显示它您应该在临时文件夹中下载原始代码,并使用命令类型对其进行编辑,如以下代码: @echo关闭 标题从pastebin下载代码并与批处理一起显示 设置“url”=https://pastebin.com/raw/J5xb0eUX" 对于(%url%)中的%%\do(设置“文件=%tmp%\%%~n\\.txt”)

我想知道是否有任何方法可以将原始pastebin页面的内容复制到批处理:

example :
https://pastebin.com/raw/J5xb0eUX

然后使用echo命令显示它

您应该在临时文件夹中下载原始代码,并使用命令类型对其进行编辑,如以下代码:

@echo关闭
标题从pastebin下载代码并与批处理一起显示
设置“url”=https://pastebin.com/raw/J5xb0eUX"
对于(%url%)中的%%\do(设置“文件=%tmp%\%%~n\\.txt”)
调用:下载“%url%”%File%
如果存在“%File%”,请键入“%File%”
暂停>取消并退出
::*********************************************************************************
:下载
Powershell.exe-命令“(新对象系统.Net.WebClient)。下载文件('%1','%2')”
退出/b
::*********************************************************************************
编辑:

下面是显示代码并将其保存在新文本文件中的另一个示例:

@echo关闭
标题从pastebin下载代码并与批处理一起显示
设置“url”=https://pastebin.com/raw/vzx1dEdW"
对于(%url%)中的%%\do(设置“文件=%tmp%\%%~n\\.txt”)
调用:下载“%url%”%File%
如果存在“%File%”(
(键入“%File%”>con
Rem将内容保存在新文本文件中
(键入“%File%”>Multi\u Downloading\u Files.txt)
)
启动“Multi\u下载\u文件.txt”
暂停>取消并退出
::*********************************************************************************
:下载
Powershell.exe-命令“(新对象系统.Net.WebClient)。下载文件('%1','%2')”
退出/b
::*********************************************************************************

@Fienda在这种情况下,别忘了接受这个答案哦,是的,对不起!完成!yatik saha;)@非常欢迎您和yatik alef saha链接inti:)