как пакетно изменить дату, созданную на дату изменения

1296
user150951

У меня много видео файлов, заканчивающихся расширениями mov, avi, mp4 и mts. Мне нужно изменить их «дата создания» на «дату изменения значения»

Я попытался использовать следующий скрипт powerhsell:

Get-ChildItem -recurse -filter * .mov * avi * mp4 * mts | % {$ .CreationTime = $ .LastWriteTime}

Но все, что я получил, было куча сообщений об ошибках

как пакетно изменить дату, созданную на дату изменения

0
Ошибка, которую вы получаете, связана с разрешениями. Убедитесь, что у вас есть необходимый доступ к этим файлам. Tim Ferrill 9 лет назад 0

1 ответ на вопрос

0
Colyn1337

For most access denied errors there's usually a rights/permissions issue. First, I would retry your existing command with an elevated powershell instance. To elevate, right click on the powershell icon and choose run as administrator.

If that fails, navigate to the location with your user account and verify that you have permissions (for the purpose of testing, ensure you have "full access" to rule out permissions). Re-mediate any permissions issues and try again.

If you're still having issues consider whether or not you're on a domain, whether or not the files are on a network/drive share, and whether or not that share is linux or microsoft. It might be helpful to update your question with those specifics.

Похожие вопросы