Forum Home
Press F1
 
Thread ID: 119126 2011-07-06 04:54:00 Batch renaming files to DOS-compatible 8-char length Chilling_Silence (9) Press F1
Post ID Timestamp Content User
1215154 2011-07-06 11:17:00 The
%fname:~0,5% in the bottom line should probably be
!fname:~0,5! or it will probaby just use the first filename for the basename, not the first 5 chars of each successive file (if that matters).
fred_fish (15241)
1215155 2011-07-06 21:15:00 You could also try something like:

for %A in (*.*) do @(
@rename %A asgdsad.zxxvczx
@rename asgdsad.zxxvczx %~snxA
)

(non-batch version - you need to add an extra '%' in the batch file)
That renames the file to its system-allocated 8.3 version of its name.
MushHead (10626)
1215156 2011-07-06 22:50:00 Worked a treat!! Thanks so much :D Chilling_Silence (9)
1 2