vbscript - Permission denied on CopyFile in VBS -


i'm trying automate pushing file users' home directories, stuck on "permission denied" error — thrown on line 6 here, copyfile call.

there other parts of script (not shown) create , copy folder contents using same source , destination directories, , work perfectly. it's when use copyfile fails.

dim fso  set fso = createobject("scripting.filesystemobject")  if not fso.fileexists("h:\minecraft\.minecraft\options.txt")         fso.copyfile "c:\minecraft\options.txt", "h:\minecraft\.minecraft\" end if  set fso = nothing 

h: network home directory, current user has full read/write privs.

i've tried adding/removing trailing slashes paths, adding "options.txt" destination path, removing false argument... not sure else try. thoughts?

thanks!

fyi, chunk of code, comes before error-prone bit above, executes every time:

if not fso.folderexists("h:\minecraft\.minecraft\bin\")     if not fso.folderexists("h:\minecraft\.minecraft\")         fso.createfolder("h:\minecraft\.minecraft\")     end if     fso.getfolder("c:\minecraft\bin\").copy "h:\minecraft\.minecraft\" end if 

i've seen copyfile fail permission denied error in 1 of these 3 scenarios:

  • an actual permission problem either source or destination.
  • destination path folder, not have trailing backslash.
  • source file locked application.

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -