|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Getting a VBscript to access My Documents folder
I'm new to using the windows scripting host, and I'm trying to write a script which will copy a file to the current users My documents folder, then run it.
I know i can use %windir%\ to access the windows folder, but is there a %mydocuments%\ I can use? |
|
#2
|
||||
|
||||
|
Try this:
Code:
%homepath%\My Documents\
__________________
Come JOIN the party!!! Quote of the Month: Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
|||
|
|||
|
I'm trying to use these 2 lines to copy a file over from a network path, then run it. I don't think I have the syntax correct for the my documents path tho, as I am a complete VBScript dweeb.
FSys.CopyFile "\\2000irdc\group_drive\HR\Ops_Display.mdb", "%homepath%\My Documents\sdb\", true WShell.Run "%homepath%\My Documents\sdb\ops_display.mdb", 2, false |
|
#4
|
||||
|
||||
|
Try this:
Code:
FSys.CopyFile "\\2000irdc\group_drive\HR\Ops_Display.mdb", "c:%homepath%\My Documents\sdb\", true WShell.Run "c:%homepath%\My Documents\sdb\ops_display.mdb", 2, false |
|
#5
|
|||
|
|||
|
Fantastic thanks a lot!!
|
|
#6
|
||||
|
||||
|
glad it's working for ya
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Getting a VBscript to access My Documents folder |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|