I would love Excel to rearrange the files in a directory.
Sample FROM list of files
2202-2.pdf
2234.pdf
2235.pdf
2237.pdf
2238.pdf
2239-1.pdf
2242.pdf
1333-1.pdf
Sample TO list of files/folders:
2234 (this is a folder)
....2234.pdf (this is the file, now within the folder)
2235
....2235.pdf
2237
....2237.pdf
2238
....2238.pdf
2242
....2242.pdf
1333-1.pdf (nothing has been done with these)
2202-2.pdf
2239-1.pdf
[VBA]Private Sub Workbook_Open()
'Do the folder making
On Error GoTo
'A message box that says "This operation has aborted due to file naming error(s)."
'and no folders should be made at all
End Sub
[/vba]
Acceptable filename formats:
nnnn.pdf
nnnn-n.pdf
The path, which I'd like to be able to change IN THE CODE, is:
P:\Stock Room
If we need the name of the server, let's call it MyServer
Thanks sooooo much!!!
Help!