DanClark86
MIS
I have a project where i have to print 30,000 indivdual files in 800 folders under a subfolder C:\00
How would i write a scrip to do this task or combine the follwing two scripts. The Top Script renames any file from *.1 to *.doc in any folder on a root, and the second scrip prints all of the files in a folder. If i could combine these two, it would server the purpuse
How would i write a scrip to do this task or combine the follwing two scripts. The Top Script renames any file from *.1 to *.doc in any folder on a root, and the second scrip prints all of the files in a folder. If i could combine these two, it would server the purpuse
Code:
And what about this ?
Set FSO = CreateObject("Scripting.FileSystemObject")
ShowSubfolders FSO.GetFolder("C:\work")
Sub ShowSubFolders(Folder)
For Each objFile In Folder.Files
If Right(objFile.Name, 2) = ".1" Then
objFile.Name = Left(objFile.Name, Len(objFile.Name)-1) & "doc"
End If
Next
End Sub
Code:
TargetFolder = "C:\00\"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TargetFolder)
Set colItems = objFolder.Items
For i = 0 to colItems.Count - 1
colItems.Item(i).InvokeVerbEx("Print")
Next