如果“系统找不到指定的文件”,如何使“类型”命令执行> nul

时间:2019-05-31 02:50:43

标签: batch-file nul

我一直在测试一个批处理文件,用来查看我的想法是否可以批量工作。我有一个制作日志系统的想法,但是如果找不到该文件,则不会显示“ 系统找不到指定的文件。

我尝试过/** * vmalloc_exec - allocate virtually contiguous, executable memory * @size: allocation size * * Kernel-internal function to allocate enough pages to cover @size * the page level allocator and map them into contiguous and * executable kernel virtual space. * * For tight control over page level allocator and protection flags * use __vmalloc() instead. * * Return: pointer to the allocated memory or %NULL on error */ void *vmalloc_exec(unsigned long size) { return __vmalloc_node(size, 1, GFP_KERNEL, PAGE_KERNEL_EXEC, NUMA_NO_NODE, __builtin_return_address(0)); } arc diff,但是第一个刚刚退出了文件,第二个显示了:

arc diff --reviewers 'xxx'

下面是您需要重新创建的所有内容。

type A6Test.log &if %ERRORLEVEL%==1 >nul

如果文件不存在,但我希望type A6Test.log ^&if %ERRORLEVEL%==1 >nul不显示任何内容,但显示为:

The system cannot find the file specified.
Error occurred while processing: A6Test.log.
The system cannot find the file specified.
Error occurred while processing: &If.
The system cannot find the file specified.
Error occurred while processing: 1.

0 个答案:

没有答案