The filename directory name or volume label syntax is incorrect что делать
«The filename, directory name, or volume label syntax is incorrect» error when you attach a new drive in the backup schedule in Windows Server 2012
Symptoms
Consider the following scenario:
You have a computer that is running Windows Server 2012.
You use the Windows Server Backup utility to back up files to an external drive.
You remove the external drive after the backup is complete.
You try to attach a second drive in the backup schedule. For example, you attach another external drive, and then you run the following command:
In this scenario, you receive an error message that resembles the following:
The filename, directory name, or volume label syntax is incorrect.
Note The placeholder represents the disk identifier number. You can run the wbadmin get disks command to check the disk identifier number, and the output resembles the following:
Disk name: xxxxxxxxxxx
Disk number: x
Disk identifier:
Total space: xxx.xx GB
Used space: xxx.xx GB
Resolution
Hotfix information
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a «Hotfix Download Available» section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=supportNote The «Hotfix Download Available» form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Prerequisites
To apply this hotfix, you must be running Windows Server 2012.
Registry information
To use the hotfix in this package, you do not have to make any changes to the registry.
Restart requirement
You must restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace a previously released hotfix.
The filename directory name or volume label syntax is incorrect что делать
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
When I try to add another drive to backup schedule I get below error;
The filename, directory name, or volume label syntax is incorrect.
How can I fix this please?
Answers
I saw this error before which is caused that a previous drive target is not longer available. We need delete it before adding a new drive.
Then I searched for the error and noticed that we have already an article about this error:
Error message when you try to add an additional disk to a scheduled backup: «The filename, directory name, or volume label syntax is incorrect»
http://support.microsoft.com/kb/2009365/en-us
Please try the steps to see if issue could be fixed.
What are possible reasons for java.io.IOException: «The filename, directory name, or volume label syntax is incorrect»
I am trying to copy a file using the following code:
For some users the targetFile.createNewFile results in this exception:
Filename and directory name seem to be correct. The directory targetPath is even checked for existence before the copy code is executed and the filename looks like this: AB_timestamp.xml
The user has write permissions to the targetPath and can copy the file without problems using the OS.
As I don’t have access to a machine this happens on yet and can’t reproduce the problem on my own machine I turn to you for hints on the reason for this exception.
13 Answers 13
This can occur when filename has timestamp with colons, eg. myfile_HH:mm:ss.csv Removing colons fixed the issue.
Try this, as it takes more care of adjusting directory separator characters in the path between targetPath and filename:
I just encountered the same problem. I think it has to something do with write access permission. I got the error while trying to write to c:\ but on changing to D:\ everything worked fine. Apparently Java did not have permission to write to my System Drive (Running Windows 7 installed on C:)
Here is the test program I use
Take a look at the comment in the Exception and try to vary all the elements in the path name of the file. Experiment. Draw conclusions.
Remove any special characters in the file/folder name in the complete path.
Do you check that the targetPath is a directory, or just that something exists with that name? (I know you say the user can copy it from the operating system, but maybe they’re typing something else).
Does targetPath end with a File.separator already?
(It would help if you could log and tell us what the value of targetPath and filename are on a failing case)
Maybe the problem is that it is copying the file over the network, to a shared drive? I think java can have problems when writing files using NFS when the path is something like \mypc\myshared folder.
What is the path where this problem happens?
Try adding some logging to see exactly what is the name and path the file is trying to create, to ensure that the parent is well a directory.
In addition, you can also take a look at Channels instead of using a loop. 😉
Neither createNewFile or createFileExclusively are synchronized when I look at the OpenJDK source, so you may have to synchronize this block yourself.
Maybe the file already exists. It could be the case if your timestamp resolution is not good enough. As it is an IOException that you are getting, it might not be a permission issue (in which case you would get a SecurityException).
I would first check for file existence before trying to create the file and try to log what’s happening.
Look at public boolean createNewFile() for more information on the method you are using.
As I was not able to reproduce the error on my own machine or get hands on the machine of the user where the code failed I waited until now to declare an accepted answer. I changed the code to the following:
After that it worked for the user reporting the problem.
I yet have to talk that user into helping me verifying that the code change fixed the error (instead of him doing something differently) by running the old version again and checking if it still fails.
The filename directory name or volume label syntax is incorrect что делать
This forum is closed. Thank you for your contributions.
Asked by:
Question
Is there a different source path format than «C:\test\results\.» I need to use in docker cp to copy the files from the c:\test\results folder in the container? I’m running 17.06 ee on Server 2016 1709 build 16299.15
Results File: c:\test\results\ContainerUser_TESTHOST_2018-10-01_08_12_10.trx
Error response from daemon: GetFileAttributesEx \\?\Volume<8713c709-085d-43e0-9205-15a7d86efb87>\test\results\.: The filename, directory name, or volume label syntax is incorrect.
PS D:\TestAgent\_work\18\s> docker version
Client:
Version: 17.06.2-ee-16
API version: 1.30
Go version: go1.8.7
Git commit: 9ef4f0a
Built: Thu Jul 26 16:43:19 2018
OS/Arch: windows/amd64
Server:
Engine:
Version: 17.06.2-ee-16
API version: 1.30 (minimum version 1.24)
Go version: go1.8.7
Git commit: 9ef4f0a
Built: Thu Jul 26 16:52:17 2018
OS/Arch: windows/amd64
Experimental: false
Powershell script snippet:
This posting is provided «as is» and confers no rights.