Try and change the following -
filesys.CopyFolder "L:\Voice Profiles\*", "c:\Documents and Settings\%USERNAME%\My Documents\"
to
filesys.CopyFolder "L:\Voice Profiles\*", "c:\%homepath%\My Documents\"
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
The part I found earlier on will restrict you in Vista and win 7. I believe you can use the part %homepath%, which refers to your documents on XP, Vista and 7.
It does however seems that you have to use "copyfolder" AND ""copyfile"
Set filesys = CreateObject("Scripting.FileSystemObject")
filesys.CopyFolder "\\L:\voiceprofiles\*", "c:%homepath%\My Documents\" ,True 'Had to remove the slash after c:... dummy me. Also, before L: the 2 backslashes for network access it seems.
filesys.CopyFile "\\L:\voiceprofiles\*", "c:%homepath%\My Documents\", True
MsgBox"BackUp completed, Goodbye", vbInformation, "Script Informer"
I hope this helped.:twisted:
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
We are now getting there ramaliah. You still have to open your own thread though. Scroll right to the top of this page. You will see that there are headings, "Editorial", "Hardware & Software", and "Software".
HOLD your mouse over Software. a Popup will show with all of the menus under Software.
Select Visual Basic 4/5/6 by clicking on it.
Once the page opens, just below these headings you were before, you will see a heading "Want to start a new topic discussion? ... Click Here to Start a New Thread"
This will open a new post box that you can type your question in to. Again, please tell us what datbase you are using (Access, Sql, MySql etc.), what you need and most IMPORTANT, what have you coded so far.
I'll follow your new thread as soon as it is posted.
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350