filecopy between servers did not work

Started by pamsniffer, February 27, 2015, 01:11:51 AM

Previous topic - Next topic

pamsniffer

Hi,

I have tried to copy files between servers that, but for some reason it did not work.

FileCopy("\\server1\c$\temp*.txt", "\\server1\c$\temp", @FALSE)


Pam

stanl

Pam;

If you set the last parm to @TRUE, your should get a warning about over writing and at least know the other parameters were correct. 

nrr

Pam ... paste '\\server1\c$\' into an Windows Explorer window and see if it opens to the expected location and see if there are and *.txt files there.  Also, it appears that you're just copying all the *.txt files back to the same server.  Is that what you intended?  Try copying the files to a different folder and see if that works.

pamsniffer

Sorry type

FileCopy("\\server1\c$\temp*.txt", "\\server2\c$\temp", @FALSE)

pamsniffer

hi,

for some reason this script is not working, unc copt seem not to work.

server="\\2012\c$\"
servernaam="\\2012"

AddExtender('wwwnt34i.dll')
debug(@on)
runwait("net.exe"," use e: %server% /user:admin  admin")
delay(3)
DirMake("%server%tempold")
filecopy("ump.bat", "%server%tempold",@false)
filecopy("ha.ps1","%server%tempold",@false)
runwait("psexec","%servernaam% -w c:\tempold cmd.exe /c c:\ump.bat")
filecopy("%server%tempold\*UMP*.*","d:\",@false)
filedelete("%server%tempold\*WIND*.*| *UMP*.* | hal.*",@false)
DirRemove("%server%tempold")



pam