好吧.刚改的.如果有问题,看我签名加好友沟通.- @set @n=0/*&echo off
- dir /a-d/s/b *.XLS *.JPG *.DXF|cscript -nologo -E:jscript "%~f0"
- pause&exit */
-
- var fso=new ActiveXObject('scripting.FileSystemObject');
-
- while(!WSH.StdIn.AtEndOfStream)
- {
- path=WSH.StdIn.ReadLine();
- var count=0
- path.replace(/\\/g, function(){count++;});
- if(count<5) continue;
-
- var NewPath=path.replace(/^(\w:\\[^\\]*).*\\([^\\]*)\\[^\\]*$/g,'$1\\$2\\')
- if(!fso.FolderExists(NewPath)) fso.CreateFolder(NewPath);
- fso.MoveFile(path, NewPath);
- }
复制代码
|