whoa there, pardner!
Your request has been blocked due to a network policy.
Try logging in or creating an account here to get back to browsing.
If you’re running a script or application, please register or sign in with your developer credentials here. Additionally make sure your User-Agent is not empty and is something unique and descriptive and try again. if you’re supplying an alternate User-Agent string, try changing back to default as that can sometimes result in a block.
You can read Reddit’s Terms of Service here.
if you think that we’ve incorrectly blocked you or you would like to discuss easier ways to get the data you want, please file a ticket here.
when contacting us, please include your ip address which is: 95.214.216.211 and reddit account
Batch file «unc path not supported» copying files
I also tried using some Robocopy commands but I couldn’t get it to work either but ideally I’d like to use the forfiles command to perform the copy operation.
41k 27 27 gold badges 90 90 silver badges 122 122 bronze badges
asked Feb 14, 2019 at 3:02
Jitendra Gupta Jitendra Gupta
97 1 1 gold badge 2 2 silver badges 10 10 bronze badges
2 Answers 2
The issue seems to be with using the forfiles command and it not supporting UNC paths. You can use pushd to map the UNC path for you, then just use the rest of the path after the \\servername\sharename that maps which contains folders you need to run the commands against. End the script with the popd command to disconnect any temporary mapped drives created with the pushd command.
Script
SET DESTINATION=c:\temp\new SET DATE_FROM=02/13/2019 SET DATE_TO=02/13/2019 PUSHD \\sdpw9123app\work > nul forfiles /P \ActiveMQ\logfile /S /D +%DATE_FROM% /C "cmd /C if @isdir==FALSE 2> nul forfiles /M @file /D -%DATE_TO% && > con ( echo @path && copy /V @path %DESTINATION% )" POPD pause
- Instead of using forfiles /P \\sdpw9123app\work\ActiveMQ\logfile
- Use PUSHD \\sdpw9123app\work on the line before the forfiles command
- Run the forfiles command line as forfiles /P \ActiveMQ\logfile
- Use POPD on the line after the forfiles command
Further Resources
UNC Network paths When a UNC path is specified, PUSHD will create a temporary drive map and will then use that new drive. The temporary drive letters are allocated in reverse alphabetical order, so if Z: is free it will be used first.
UNC Paths Not Supported
THERM does not support UNC (Uniform Naming Convention) paths. An example of such a path is:
If you open a file with such a path, the program will crash when you try to import a glazing system.
Look in the INI file for the program in question (such as THERM 7.2.ini). These INI files are found in:If there is a UNC path in that INI file, change it to the default program path, such as
You can solve this problem by mapping a normal drive letter to the path that has the UNC path.
Saved searches
Use saved searches to filter your results more quickly
Cancel Create saved search
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
desktop / desktop Public
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMD.EXE does not support UNC paths #14181
Bidski opened this issue Mar 16, 2022 · 5 comments
CMD.EXE does not support UNC paths #14181
Bidski opened this issue Mar 16, 2022 · 5 comments
Comments
Bidski commented Mar 16, 2022
Describe the bug
When monitoring a repository stored inside a WSL2 instance, CMD.EXE is launched with a UNC path which is not supported. Even after choosing Windows Terminal as the shell under Options -> Integrations this still occurs.
Version & OS
Github Desktop: 2.9.11 (x64)
OS: Windows 10 Pro 19042.685Steps to reproduce the behavior
- Have a repo with a pre-commit hook (or any commit hook, my repo has some husky hooks for instance)
- Make a commit
- Push commit
- See error
Expected behavior
Commit hooks run without any issues
Actual behavior
CMD.EXE fails as it doesn’t support UNC paths.
Additional context
I think one of the following options needs to be adopted
- Github Desktop should default to a terminal that supports UNC paths
- Github Desktop should use the shell that is specified in the shell integration, or more control over which shell is launched when using Windows Terminal integration. However, WSL2/Ubuntu is set as the default profile for my Windows Terminal so I am not sure if Github Desktop is honouring this of if it is still just launching Command Prompt inside of Windows Terminal, of if it just ignoring this setting altogether
- Better support for repositories stored in WSL2
The text was updated successfully, but these errors were encountered:
johannesschobel commented May 4, 2022
Dear @Bidski , i have found a possible solution for this issue:
You need to manually create a new Windows registry key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\DisableUNCCheck
with the type DWord and set the value to 1 .
This will then disable the UNC Check for paths.The solution worked for me, as i can not execute Husky GitHooks from within GitHub Desktop.
Hope this helps,
All the best,CombesA commented Jun 8, 2022
Dear @Bidski , i have found a possible solution for this issue: You need to manually create a new Windows registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\DisableUNCCheck
with the type DWord and set the value to 1 . This will then disable the UNC Check for paths.
The solution worked for me, as i can not execute Husky GitHooks from within GitHub Desktop.
Hope this helps, All the best,
This worked like a charm for me, thanks.