{"action":"created","issue":{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/19","labels_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/19/comments","events_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/19/events","html_url":"https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/19","id":72159303,"number":19,"title":"Toolkit Variables not working with Copy-Files","user":{"login":"Kevinnns","id":12066544,"avatar_url":"https://avatars.githubusercontent.com/u/12066544?v=3","gravatar_id":"","url":"https://api.github.com/users/Kevinnns","html_url":"https://github.com/Kevinnns","followers_url":"https://api.github.com/users/Kevinnns/followers","following_url":"https://api.github.com/users/Kevinnns/following{/other_user}","gists_url":"https://api.github.com/users/Kevinnns/gists{/gist_id}","starred_url":"https://api.github.com/users/Kevinnns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kevinnns/subscriptions","organizations_url":"https://api.github.com/users/Kevinnns/orgs","repos_url":"https://api.github.com/users/Kevinnns/repos","events_url":"https://api.github.com/users/Kevinnns/events{/privacy}","received_events_url":"https://api.github.com/users/Kevinnns/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-30T13:26:22Z","updated_at":"2015-04-30T18:14:11Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using the latest version (3.6.3 beta) and it seems that i've found a little problem.\r\nWhen wanting to copy a file from the Files directory i get an error:\r\n```\r\n[Installation] :: Failed to copy file(s) in path [$dirFiles\\java.settings.cfg] to destination [C:\\ProgramData\\Oracle\\Java\\java.settings.cfg]. \r\nError Record:\r\n-------------\r\n\r\nMessage        : Cannot find path 'C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\$\r\n                 dirFiles\\java.settings.cfg' because it does not exist.\r\nInnerException : \r\n\r\nFullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemComm\r\n                        and\r\n\r\nPositionMessage : \r\n                  At C:\\WINDOWS\\ccmcache\\53\\AppDeployToolkit\\AppDeployToolkitMa\r\n                  in.ps1:2869 char:14\r\n                  +                 Copy-Item <<<<  -Path $Path -Destination $d\r\n                  estination -Force -ErrorAction 'Stop' | Out-Null\r\n\r\n\r\n\r\n\tCopy-File\t30-04-2015 14:44:35\t2148 (0x0864)\r\n```\r\nDebunking that, i've ran the Copy-File command *.* destination C:\\ProgramData\\Oracle\\Java\\java.settings.cfg. That works just fine (i get alot of files ie. powershell.exe).\r\n\r\nIt looks to me that when you use variables like $dirFiles and in my case $envProgramData the task fails.\r\n\r\nSo maybe the first question i have to ask is; Should Copy-Files be able to use toolkit variables?"},"comment":{"url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/comments/97902907","html_url":"https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/19#issuecomment-97902907","issue_url":"https://api.github.com/repos/PSAppDeployToolkit/PSAppDeployToolkit/issues/19","id":97902907,"user":{"login":"mmashwani","id":5581235,"avatar_url":"https://avatars.githubusercontent.com/u/5581235?v=3","gravatar_id":"","url":"https://api.github.com/users/mmashwani","html_url":"https://github.com/mmashwani","followers_url":"https://api.github.com/users/mmashwani/followers","following_url":"https://api.github.com/users/mmashwani/following{/other_user}","gists_url":"https://api.github.com/users/mmashwani/gists{/gist_id}","starred_url":"https://api.github.com/users/mmashwani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmashwani/subscriptions","organizations_url":"https://api.github.com/users/mmashwani/orgs","repos_url":"https://api.github.com/users/mmashwani/repos","events_url":"https://api.github.com/users/mmashwani/events{/privacy}","received_events_url":"https://api.github.com/users/mmashwani/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T18:14:11Z","updated_at":"2015-04-30T18:14:11Z","body":"I can't be sure as you did not share the original code you have in your script for calling the Copy-Files function, but I think you're using single quotes instead of double quotes around text that contains variables. Single quotes around a variable name means that you wish PowerShell to interpret the text exactly as written. Double quotes means that PowerShell should expand the variable to the value that it contains. Please make sure this is not the problem. Otherwise, you will need to share the original code you have so we can see what is going on.\r\n\r\nAlso, I edited your post to put the log contents into a code block so that it is easier to read. If you post any code or log file contents, put them in a code block. You can do this by entering three back ticks, `, before and after the text that should be in a code block."}}