Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? work with files with commas in name

Apr
1,825
17
setdos doesn't seem to be helpful. and even "^," doesn't work either
 
Code:
dir /s /b *,,* > a.a

[C:\Program Files\JPSoft\TCMD31]plugiN /I FIXNAMES
Module:      c:\TCMD\Plugins\fixnames\FixNames.dll
Name:        FixNames
Author:      Charles Dye
Email:       [email protected]
Web:         http://prospero.unm.edu/plugins/fixnames.html
Description: Renames filenames containing troublesome characters
Implements:  fixnames
Version:     0.40  Build 0

[C:\Program Files\JPSoft\TCMD31]fixnames /?
Rename files to remove troublesome characters.

FIXNAMES /A /B /C /D /E /N /P /Q:list /R:list /S filespec...

        /A   replace Ampersands with underscores
        /B   replace Blanks with underscores
        /C   replace parentheses with underscores
        /D   rename Directories, not files
        /E   decode =XX hex pairs
        /N   Not really
        /P   Prompt before each
        /Q:  list of characters to replace
        /R:  replacement characters; use with /Q:
        /S   recurse into Subdirectories

Use wildcards to match the difficult characters.  Note that you
do not supply a “new” or replacement filename; the plugin
generates its own.  These new names can then be changed with
REN, if desired.

ren start BTM
for %fn in (@ZZ_DoneSorted.txt) gosub Dofile
QUIT

:Dofile
  iff %@index["%fn",^,] GT 0 THEN
    echo On: %fn
    set nLoop=1
    do until not isfile "%fn"
      iff not isfile "c:\ZZ_DoneSorted\%@upper[%@ext[%fn]]_%@format[04,%nLoop]\%@filename[%fn]" then
        move /md /r "%fn" "c:\ZZ_DoneSorted\%@upper[%@ext[%fn]]_%@format[04,%nLoop]\"
      else
        set /a nLoop=nLoop+1
      endiff
    enddo
  ENDIFF
  return
ren end BTM
 
Back
Top
[FOX] Ultimate Translator
Translate