UNC path is not supported error

I recently had an issue running a batch file using a UNC path and discovered that UNC paths are not always supported. This failed in the following line.

ForFiles /p "\\Server\folder\username\SQLBackups" /s /d -13 /c "cmd /c del /q @file"

The solution was to use PUSHD and POPD as shown here

:: Create a temporary drive letter mapped to your UNC root location
:: and effectively CD to that location
pushd \\Server\folder\username

:: Do your work
ForFiles /p "SQLBackups" /s /d -13 /c "cmd /c del /q @file"

:: Remove the temporary drive letter and return to your original location
popd

Explained here: windows - How to run batch file from network share without "UNC path are not supported" message? - Stack Overflow

Robocopy Permissions - Access Denied

When running a Robocopy command to copy files from a Windows file location to a UNIX type location such as a NAS DO NOT use the \B switch. This will result in Access Denied because it will try to copy the Windows permissions to the NAS location adn it's not possible for obvious Reasons.