onedrives在文件中查询和设置文件按需Windows

使用OneDrive文件随需要,文件可以有三种状态之一。 其中每个状态对应于一个文件属性状态。 若要查询文件或文件夹的当前状态,请使用以下命令:

  • attrib <Path to file or folder>

可编写脚本的命令

使用以下命令设置文件和文件夹状态。

文件按需状态 文件属性状态 Command
始终可用 已固定 attrib +p <path>
本地可用 Clearpin attrib -p <path>
仅联机 Unpinned attrib +u <path>

About the Author

You may also like these