Forum Discussion
Copying files to devices through Intune does not work
REM create Directory
cmd /c mkdir "C:\Temp\Folder2"
xcopy FILE1.JPG "c:\Temp\Folder2" /y
xcopy FILE2.JPG "c:\Temp\Folder2" /y
3 Replies
- Jannik_ReinhardIron Contributor
oryxway390 : You can checkout my blob post where I explain how to copy an exe to an specific location. For sure you can easily adapt this to other file types.
https://jannikreinhard.com/2021/07/24/deploy-an-win32-app-with-intune-cmtrace/
- Moe_KinaniBronze ContributorAgree with my colleagues Jannik and Kurt.
Good luck!
Moe
In this blog I copied Lockscreen image to C:\Windows\folder.
https://cloudbymoe.com/f/change-windows-10-pro-lock-screen-using-intune
- KurtBMayerIron Contributor
Take a look at these articles on packaging IntuneWin apps to ensure you're bundling in everything you need and following all the steps.
Best Guide Intune Win32 App Deployment | Endpoint Manager
Relative File Paths in Powershell
It's okay to put things all in one directory if needed, but the second link has some tips on scripting you might want to consider. Instead of copying to a literal path of c:\temp you should try using relative paths or the $scriptroot variable, which will put you in the correct location of your content wherever Intune caches it, which would make things more flexible.
Please like or mark this thread as answered if it's helpful, thanks!