批处理获取某路径下最新创建的文件的名称 by:授客 QQ:1033553122 echo off setlocal enabledelayedexpansion rem 设置文件所在目录 set src_dir=F:\Download\test rem filename用于存放目标文件名 set filename="" cd /d %src_dir% for /f %%a in ('dir /o-d /tc /b test*.html') do ( echo 文件完整信息: %
// 第一种: 2 File f = new File(this.getClass().getResource("/").getPath()); // 结果: /Users/admin/Documents/IdeaProjects/Demo/out/production/Demo System.out.println(f); f = new File(this.getClass().getResource("").getPath()); // 多返回了包名 // 结