I'm having trouble getting this to work. Here is my code. I'm not getting any
error:
Sub copy_contents_of_folder()
sourcepathname = "C:\Documents and
Settings\dmobley\Desktop\JunkFolder\TESTEXCEL"
destpathname = "C:\Documents and Settings\dmobley\My Documents\My Music"
filemask = "*.xls"
fname = Dir(sourcepathname & filemask, vbNormal)
Do While fname <> ""
FileCopy sourcepathname & fname, destpathname & fname
fname = Dir()
Loop
End Sub
> Try this:
>
[quoted text clipped - 15 lines]
> Hope it helps
> Col
colofnature - 23 May 2006 15:15 GMT
Couple of things - first, add "\" to the end of values in
"sourcepathname" and "destpathname", and second, if you're copying
anything other than spreadsheets you'll need to change the value of
"filemask" to whatever the extension is for that type of file (e.g.
"*.mp3", "*.jpg" etc)
Col

Signature
colofnature
colofnature - 23 May 2006 15:15 GMT
Couple of things - first, add "\" to the end of values i
"sourcepathname" and "destpathname", and second, if you're copyin
anything other than spreadsheets you'll need to change the value o
"filemask" to whatever the extension is for that type of file (e.g
"*.mp3", "*.jpg" etc)
Co