I
added the Note =
mainfolder.files.count - 1 and am able to know how many there are left to
process !!!
Sub
LoopFiles()
Set fso = CreateObject("Scripting.FileSystemObject")
Set mainfolder = fso.getfolder("R:")
'Set mainfolder = fso.getfolder("C:\UIC\")
Set filecollection = mainfolder.Files
For Each file In filecollection
CurrFile = mainfolder & file.Name
Call enterFileName(file.Name)
'to create a copy of the original file with extension .BCK in DayBackupDir
fso.movefile CurrFile, DayBackupDir & file.Name & ".BCK"
Set fso = CreateObject("Scripting.FileSystemObject")
Set mainfolder = fso.getfolder("R:")
'Set mainfolder = fso.getfolder("C:\UIC\")
Set filecollection = mainfolder.Files
For Each file In filecollection
CurrFile = mainfolder & file.Name
Call enterFileName(file.Name)
'to create a copy of the original file with extension .BCK in DayBackupDir
fso.movefile CurrFile, DayBackupDir & file.Name & ".BCK"
'to remove
the file from the
original location
'Kill CurrFile
Note = mainfolder.Files.Count - 1
Next
End Sub
'Kill CurrFile
Note = mainfolder.Files.Count - 1
Next
End Sub
thanx !!!, sherry
HCA Midwest Division IT&S
816/823-0406
-----Original Message-----
From: Turner, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 5:38 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] ShowFolderFileCount was Blocking and Deleting Text in a Windows Text BoxActually the "as string" probably won't work with pure vbscript - just leave it of and pass a string:msgbox ShowFolderFileCount( "C:\BostonWorkStation")I'll leave error checking code to your imagination.-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Turner, Peter
Sent: Thursday, December 09, 2004 5:31 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] ShowFolderFileCount was Blocking and Deleting Text in a Windows Text BoxI have used this:Function ShowFolderFileCount(FolderName As String)
Dim FileSystemObject
Dim Folder
Dim Files
Set FileSystemObject = CreateObject("Scripting.FileSystemObject")
Set Folder = FileSystemObject.Getfolder(FolderName)
Set Files = Folder.Files
ShowFolderFileCount = Files.CountEnd FunctionBut sometimes the numbers are off a bit - usually in something like a WINNT folder that has some weird filesGoogle "Microsoft Windows Script 5.6 Documentation" for more documentation on scripting there is a Required Reading help file for scripting & FSO details.Peter Turner
Fort HealthCare
(920) 568-5137-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mitchell, Sherry
Sent: Thursday, December 09, 2004 4:47 PM
To: [EMAIL PROTECTED]
Subject: [Talk] Blocking and Deleting Text in a Windows Text BoxI can't get the following to highlight the character string so that the delete will delete the whole string not just the first character ... (OS is Windows 2000/ Service Pack 4, latest BostonWorkStation 7.0 if that might make a difference!).Key "{HOME}"Key "{+END}"Key "{DELETE}"I'm also wondering how, when using FileSystemObject code (which I had tremendous help in setting up!!!), to get a count of the number of files in the folder ???thanx in advance!!!, sherryHCA Midwest Division IT&S816/823-0406
