DexterRivera
-
Total Posts
:
26
- Scores: 1
-
Reward points
:
10590
- Joined: 10/30/2008
-
Status: offline
|
Help with FileSystemObject.CopyFile
Monday, April 16, 2012 6:40 PM
( permalink)
Hello, I was wondering if someone could help me with a something I am trying to do. I am prompting user for the hostname/IP of a machine then want to copy a file to a directory on that machine. Below is what I have below so far. It echos the input fine what is failing for me is trying to copying to the destination. Any suggestions/help will be greatly appreciated. Thanks in advance. Hostname = Inputbox("Enter the hostname/IP of the target machine") If Hostname = "" Then Do While Hostname = "" Hostname = Inputbox("Enter the hostname/IP of the target machine") Loop End If 'Wscript.Echo (Hostname) strPath = (Hostname)"\C$\Windows\System32\" oFSO.CopyFile oEnv("windir") &"\System32\test.txt", strPath,True
|
|
|
|
DexterRivera
-
Total Posts
:
26
- Scores: 1
-
Reward points
:
10590
- Joined: 10/30/2008
-
Status: offline
|
Re:Help with FileSystemObject.CopyFile
Monday, April 16, 2012 6:51 PM
( permalink)
Disregard, co-worker got me past this one. strPath = "\\" & Hostname & "\C$\Windows\System32\"
|
|
|
|
skynrain
-
Total Posts
:
7
- Scores: 0
-
Reward points
:
100
- Joined: 5/10/2012
-
Status: offline
|
Re:Help with FileSystemObject.CopyFile
Thursday, May 10, 2012 10:34 AM
( permalink)
It’s going to keep me busy for a while.
|
|
|
|