![](/img/trans.png)
[英]Convert date format in file names to yyyy-mm-dd (ISO Format) - Currently in multiple other formats, including yyyy.mm.dd, mm.dd.yyyy, and mm-dd-yyyy
[英]Creating Subdirectory With Date As Today(mm-dd-yyyy) in Network Drive
我很难将子目录嵌套在共享网络驱动器的当前目录内。 我可以建立资料夹
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Windows\system32> new-item
cmdlet New-Item at command pipeline position 1
Supply values for the following parameters:
Path[0]: C:\Temp\Powershell\Date
Path[1]:
Type: directory
Directory: C:\Temp\Powershell
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 06/18/2019 10:31 AM Date
PS C:\Windows\system32> new-item
cmdlet New-Item at command pipeline position 1
Supply values for the following parameters:
Path[0]: U:\gebersole\Documents\New Placements\UI
Path[1]:
New-Item : Cannot find drive. A drive with the name 'U' does not exist.
At line:1 char:9
+ new-item <<<<
+ CategoryInfo : ObjectNotFound: (U:String) [New-Item], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.NewItemCommand
PS C:\Windows\system32>
默认情况下,提升的过程中网络驱动器不可用。 您可以在此处找到更多信息: https : //support.microsoft.com/en-gb/help/3035277/mapped-drives-are-not-available-from-an-elevated-prompt-when-uac-is-co
我建议使用解决方法2。在网络驱动器上运行net use
或New-PsDrive
,或运行不带提升New-PsDrive
的脚本。
我在尝试使用映射的驱动器时遇到类似的问题,现在仅将UNC格式用于文件路径。
代替使用U:\\gebersole\\Documents\\New Placements\\UI
,它可以使用UNC格式\\\\host-name\\share-name\\file_path
,在您的情况下,该格式类似于\\\\gebersole\\Documents\\New_Placements
。
https://www.lifewire.com/unc-universal-naming-convention-818230
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.