简体   繁体   English

将区分大小写的文件复制/同步到 Windows 10 上的文件夹中

[英]Copying/sync'ing case sensitive files into a folder on Windows 10

I just discovered we can turn on per directory case sensitivity on Windows 10 and that one needs to recursively enable this feature on every child directory so everything under the root folder supports case sensitivity.我刚刚发现我们可以在 Windows 10 上打开每个目录区分大小写,并且需要在每个子目录上递归启用此功能,以便根文件夹下的所有内容都支持区分大小写。 This is fine if I had a pre-existing directory tree I suppose.如果我有一个预先存在的目录树,那很好。

But what if I had an existing codebase, with a set of subdirectories and files that has case sensitive names, which is hosted on a remote system (eg a perforce case-sensitive server) that I want to copy over to a root folder on Windows 10 that I have enabled case sensitivity on?但是,如果我有一个现有的代码库,其中包含一组名称区分大小写的子目录和文件,托管在远程系统(例如 perforce 区分大小写的服务器)上,我想将其复制到 Windows 上的根文件夹中怎么办? 10 我启用了区分大小写? Can I (perforce) sync first to download the codebase into the root folder and then run a recursive command (as shown here Apply setCaseSensitiveInfo recursively to all folders and subfolders ) to enable case sensitivity so editors can correctly open files that just differ in case?我可以(强制)先同步以将代码库下载到根文件夹中,然后运行递归命令(如此处所示Apply setCaseSensitiveInfo recursively to all folders and subfolders )以启用区分大小写,以便编辑器可以正确打开大小写不同的文件吗? Will that work?那行得通吗? If not how can I achieve this?如果不是,我怎样才能做到这一点?

PS This is the first time I'm posting here so please let me know if this question appears ambiguous in any way and I'll do my best to edit/re-post. PS 这是我第一次在这里发帖,所以如果这个问题以任何方式出现歧义,请告诉我,我会尽力编辑/重新发布。

PPS Also I'm in the middle of a transition from a Macbook to a Windows laptop and as such do not have a windows machine to try this on for myself, so I ask this question to gain understanding, that will aid in the setup of a development environment on a Windows machine. PPS 另外,我正在从 Macbook 过渡到 Windows 笔记本电脑,因此没有 windows 机器可以自己尝试,所以我问这个问题以获得理解,这将有助于设置Windows 机器上的开发环境。 Thanks in advance!提前致谢!

Finally got my hands on a windows machine to test this behavior and I can confirm that cloning/sync'ing a repository with a subdirectory tree containing case sensitive files and folders, into a root folder that has the case sensitivity attribute enabled will work and applications are able to open these files correctly subsequently;终于拿到了一台 windows 机器来测试这个行为,我可以确认克隆/同步一个包含包含区分大小写的文件和文件夹的子目录树的存储库,到一个启用了区分大小写属性的根文件夹中将工作和应用程序随后能够正确打开这些文件; the key concept here is case-sensitivity inheritance for new children!这里的关键概念是区分大小写 inheritance 新孩子!

Sure enough, I later found this article explaining the feature: https://devblogs.microsoft.com/commandline/improved-per-directory-case-sensitivity-support-in-wsl/#case-sensitivity-inheritance果不其然,后来找到了这篇解释特性的文章: https://devblogs.microsoft.com/commandline/improved-per-directory-case-sensitivity-support-in-wsl/#case-sensitivity-inheritance

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows 7 vs Windows 10-处理批处理文件中带有空格的文件夹名称 - Windows 7 vs Windows 10 - Handling folder names with spaces in batch files 将包含许多文件的文件夹拆分到多个子文件夹(Windows 10) - Break a folder with many files to multiple subfolders (Windows 10) 从 windows 10 SSH 到 wsl2 ubuntu - SSH'ing from windows 10 into wsl2 ubuntu 如何在windows 10中使用与github同名但大小写不同的文件夹和文件? - How to use a folder and file with the same name but different case from github in windows 10? 在Windows 10中复制文件会更改其大小 - Copying file in Windows 10 changes its size 使用 CommonOpenFileDialog 到 select 一个文件夹,但仍显示 Windows 10 文件夹中的文件 - Using a CommonOpenFileDialog to select a folder but still show files within the folder in Windows 10 检查Windows 10中是否启用了“同步密码” - Check if “Sync Passwords” is enabled in Windows 10 在SyncToy 2.1 Windows 10中安排同步 - Schedule Sync in SyncToy 2.1 Windows 10 无法在 Windows 10 中删除 Ubuntu 中的文件夹 - Cannot delete folder in Ubuntu in Windows 10 Windows API访问区分大小写的路径(Bash-on-Ubuntu-on-Windows) - Windows API to access case-sensitive paths (Bash-on-Ubuntu-on-Windows)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM