更新

更新

我有一首 Windows 無法播放的歌曲,因為檔案名稱中有一個問號。

"Where Have All the Cowboys Gone?.ogg" // as an example

因此,我嘗試重命名它,但無論我是在資源管理器中還是從命令提示字元嘗試重命名,Windows 都會抱怨。

嘗試複製、重新命名或移動時出現的錯誤是:

檔案名稱、目錄名稱或卷標語法不正確

有沒有視窗在這種情況下強制重命名的方法?

更新

我會密切關注這個問題,但經過 13 個答案和多次嘗試(除了第 3 方解決方案),Windows 似乎無法做到這一點(或至少我的 Windows 不能,沒有短名稱)。所以我接受這個答案,這是我使用 Linux 的原始解決方案。很高興看到 Windows 以某種方式處理這個問題,所以不要因為我接受了這個答案就停止,問題仍然存在!

答案1

拿一張 linux live-cd 並使用它。

答案2

您是否嘗試過使用其名稱的短檔案名稱版本?例如

ren whereh~1.ogg where.ogg

如果它是當前資料夾中唯一以前幾個字母開頭的文件,則使用名稱的前 6 個字母(忽略空格),後面跟著波形符 (~),然後是 1。

答案3

  1. 在 Windows 7 中:在管理員模式下執行 cmd.exe。
  2. cd 到帶有檔案名稱的目錄中。
  3. 運行: chkdsk /V /f [我的壞檔案位於作業系統磁碟機以外的另一個磁碟機上,因此能夠卸載它。如果是作業系統驅動器,則可能必須在啟動時執行此階段。
  4. 等待(可能需要重新啟動)。

正如你將看到的結果是 chkdsk 實際上已刪除給我的文件。所以,如果你想保留這些文件,我不知道該怎麼做,但這肯定會刪除這些文件。

結果/命令日誌:

E:\islag\Music\llb>dir
 Volume in drive E is FreeAgent Drive
 Volume Serial Number is 5038-892A

 Directory of E:\islag\Music\llb

02/02/2011  12:18 PM    <DIR>          .
02/02/2011  12:18 PM    <DIR>          ..
04/04/2010  02:19 PM         4,014,099 01 Los Lonely Boys - Se?orita - www.file2
4ever.com.mp3
04/04/2010  02:18 PM         3,125,942 12 Los Lonely Boys - La Contestaci?n - ww
w.file24ever.com.mp3
               2 File(s)      7,140,041 bytes
               2 Dir(s)  87,743,991,808 bytes free

E:\islag\Music\llb>chkdsk /V
The type of the file system is NTFS.
Volume label is FreeAgent Drive.

WARNING!  F parameter not specified.
Running CHKDSK in read-only mode.

CHKDSK is verifying files (stage 1 of 3)...
  231424 file records processed.
File verification completed.
  34 large file records processed.
  0 bad file records processed.
  0 EA records processed.
  0 reparse records processed.
CHKDSK is verifying indexes (stage 2 of 3)...
18 percent complete. (29338 of 245164 index entries processed)
An invalid filename 01 Los Lonely Boys - Se?orita - www.file24ever.com.mp3 (3196
6) was found in directory 31962.
All filenames for File 31966 are invalid.
Minor file name errors were detected in file 31966.
An invalid filename 12 Los Lonely Boys - La Contestaci?n - www.file24ever.com.mp
3 (31973) was found in directory 31962.
All filenames for File 31973 are invalid.
Minor file name errors were detected in file 31973.
73 percent complete. (233817 of 245164 index entries processed)
Index entry 01 Los Lonely Boys - Se?orita - www.file24ever.com.mp3 in index $I30
 of file 31962 is incorrect.
Index entry 12 Los Lonely Boys - La Contestaci?n - www.file24ever.com.mp3 in ind
ex $I30 of file 31962 is incorrect.
  245164 index entries processed.
Index verification completed.

Errors found.  CHKDSK cannot continue in read-only mode.

E:\islag\Music\llb>dir
 Volume in drive E is FreeAgent Drive
 Volume Serial Number is 5038-892A

 Directory of E:\islag\Music\llb

02/02/2011  12:18 PM    <DIR>          .
02/02/2011  12:18 PM    <DIR>          ..
04/04/2010  02:19 PM         4,014,099 01 Los Lonely Boys - Se?orita - www.file2
4ever.com.mp3
04/04/2010  02:18 PM         3,125,942 12 Los Lonely Boys - La Contestaci?n - ww
w.file24ever.com.mp3
               2 File(s)      7,140,041 bytes
               2 Dir(s)  87,743,991,808 bytes free

E:\islag\Music\llb>chkdsk /V /f
The type of the file system is NTFS.
Cannot lock current drive.

Chkdsk cannot run because the volume is in use by another
process.  Chkdsk may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N) y
Volume dismounted.  All opened handles to this volume are now invalid.
Volume label is FreeAgent Drive.

CHKDSK is verifying files (stage 1 of 3)...
  231424 file records processed.
File verification completed.
  32 large file records processed.
  0 bad file records processed.
  0 EA records processed.
  0 reparse records processed.
CHKDSK is verifying indexes (stage 2 of 3)...
18 percent complete. (29339 of 245164 index entries processed)
Deleted invalid filename 01 Los Lonely Boys - Se?orita - www.file24ever.com.mp3
(31966) in directory 31962.
File 31966 has been orphaned since all its filenames were invalid
Windows will recover the file in the orphan recovery phase.
Correcting minor file name errors in file 31966.
Deleted invalid filename 12 Los Lonely Boys - La Contestaci?n - www.file24ever.c
om.mp3 (31973) in directory 31962.
File 31973 has been orphaned since all its filenames were invalid
Windows will recover the file in the orphan recovery phase.
Correcting minor file name errors in file 31973.
73 percent complete. (233642 of 245164 index entries processed)
Deleting index entry 01 Los Lonely Boys - Se?orita - www.file24ever.com.mp3 in i
ndex $I30 of file 31962.
Deleting index entry 12 Los Lonely Boys - La Contestaci?n - www.file24ever.com.m
p3 in index $I30 of file 31962.
  245164 index entries processed.
Index verification completed.
CHKDSK is scanning unindexed files for reconnect to their original directory.
  2 unindexed files scanned.
CHKDSK is recovering remaining unindexed files.
  2 unindexed files recovered.
CHKDSK is verifying security descriptors (stage 3 of 3)...
  231424 file SDs/SIDs processed.
Cleaning up 41 unused index entries from index $SII of file 9.
Cleaning up 41 unused index entries from index $SDH of file 9.
Cleaning up 41 unused security descriptors.
Security descriptor verification completed.
  6871 data files processed.
CHKDSK is verifying Usn Journal...
  1116928 USN bytes processed.
Usn Journal verification completed.
Correcting errors in the master file table's (MFT) BITMAP attribute.
Windows has made corrections to the file system.

 244196000 KB total disk space.
 158175168 KB in 30003 files.
     22820 KB in 6873 indexes.
         0 KB in bad sectors.
    306168 KB in use by the system.
     65536 KB occupied by the log file.
  85691844 KB available on disk.

      4096 bytes in each allocation unit.
  61049000 total allocation units on disk.
  21422961 allocation units available on disk.

E:\islag\Music\llb>dir
 Volume in drive E is FreeAgent Drive
 Volume Serial Number is 5038-892A

 Directory of E:\islag\Music\llb

02/02/2011  12:18 PM    <DIR>          .
02/02/2011  12:18 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  87,743,979,520 bytes free

E:\islag\Music\llb>

答案4

我刪除頑固檔案的方法是開啟7zip,找到該檔案並透過7zip重命名該檔案。我的歌曲是在文件末尾有一個空格的歌曲。

相關內容