Jump to content

Filecopy function


jnkbcs
 Share

Recommended Posts

Ok i have read and reread and tested this. how can u use filecopy to copy a file from one machine and send it to another computer on the network?

here is what i have so far:

#include <ButtonConstants.au3>

#include <EditConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

$sPsexe = "C:\temp\psexec \\"

$sPskill = " c:\temp\pskill.exe"

$sIEkill = " iexplore"

$answer = InputBox("Question", "Computer Name?", "", "", 251, 100, 600, 400)

FileCopy("c:\temp\pskill.exe" , "\\" & $answer [1])

Local $iexplorerun = RunWait($sPsexe & $answer & $sPskill & $sIEkill)

any help would be greatly appreciate.

note: I have searched the forums and came up with nothing. maybe i searched wrong?

Link to comment
Share on other sites

ok i slimmed it down so i can find out where its choking. i have the folllwing now:

#include <ButtonConstants.au3>

#include <EditConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

$sPskillcopy = "\c$\temp\ /y"

$answer = InputBox("Question", "Computer Name?", "", "", 251, 130, 600, 400)

RunWait("copy c:\temp\pskill.exe \\" & $answer & $sPskillcopy)

i kick it off but it still doesn't copy the file

Link to comment
Share on other sites

I have found the answer. posting it here. maybe give a newbie like me a startign point to understand the functions

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$sPsexe = "C:\temp\psexec \\"
$sPskill = " c:\temp\pskill.exe"
$sIEkill = " iexplore"
$sPskillcopy = "\c$\temp\pskill.exe"

$answer = InputBox("Question", "Computer Name?", "", "", 251, 130, 600, 400)

FileCopy("c:\temp\pskill.exe", "\\" & $answer & $sPskillcopy)

RunWait($sPsexe & $answer & $sPskill & $sIEkill)

now i am incorporating this into a larger project

Edited by jnkbcs
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...