Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Copying a file through an unknown directory to known directory

$
0
0
Set objFSO = CreateObject("Scripting.FileSystemObject") 
Set objFile = objFSO.GetFile("c:\temp\abc\123.xml") 
objFile.Copy "c:\programdata\ABC\DEF\XXXXXX\JKL\"

I am using the above in a *.VBS to copy 123.xml to the \JKL\ directory - however xxxxxx is an unknown variable: this directory could be called anything.

How can I also get 123.xml into the right directory everytime?

 

Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>