Dim fso As Object
Dim file As String, sfol As String, dfol As String
file = cell.Offset(0, 2).Value & ".zip" ' This will already be created
sfol = ' This is the source folder. The zipped file will appear in _ 'C:\Documents and Settings\kq146c\My Documents\Sweeper Test\, NOT _ 'C:\Documents and Settings\kq146c\My Documents\Sweeper Test\New 'Folder (2) _
'since the "New Folder (2)" was what was actually zipped. How _
'do I tell it not to reference the last folder? Some kind of len function? _ 'Can I tell it to somehow subtract from column F what is in column E?
dfol = ' This is the destination folder. Same concept as above. _
'I need it to reference the full path minus the last folder. And then have _
'it create a folder in that path. The naming of the new folder should be _
'simple enough: cell.offset(0, 2) & "_ZIPPED". It's just a matter placing _ 'it in the correct folder.
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FileExists(sfol & file) Then
MsgBox sfol & file & " does not exist!", vbExclamation, "Source File Missing"
ElseIf Not fso.FileExists(dfol & file) Then
fso.MoveFile (sfol & file), dfol
Else
MsgBox dfol & file & " already exists!", vbExclamation, "Destination File Exists"
End If