Ветеран
Сообщения: 27449
Благодарности: 8087
|
Профиль
|
Отправить PM
| Цитировать
читать дальше »
Код: 
Option Explicit
Dim strSourceFolder
Dim objFSO
Dim objFile
strSourceFolder = "E:\Песочница\0368"
With WScript.CreateObject("Scripting.FileSystemObject")
If .FolderExists(strSourceFolder) Then
For Each objFile In .GetFolder(strSourceFolder).Files
If LCase(.GetExtensionName(objFile.Name)) = "xls" Then
If Len(.GetBaseName(objFile.Name)) > 22 Then
objFile.Copy .BuildPath(objFile.ParentFolder, Right(.GetBaseName(objFile.Name), 21) & "." & .GetExtensionName(objFile.Name))
End If
End If
Next
Else
WScript.Echo "Source folder [" & strSourceFolder & "] not found."
WScript.Quit 1
End If
End With
WScript.Quit 0
|
Отправлено: 16:17, 24-03-2014
| #2
|