[BATCH] Wildcats for folders ?

Discussion in 'Scripting' started by sulasno, Jan 12, 2011.

  1. sulasno

    sulasno MDL Novice

    Jan 8, 2011
    7
    0
    0
    is it possible to use wildcats* for folders when using a batch file ?

    example

    REN "F:\software_*\test" test.danger

    will the above rename
    software_1\test
    software_2\test
    software_1_A\test to
    test.danger ?

    DEL /Q "F:\software_*\test.1"

    will the above delete test.1
    from software_1
    software_A
    software_2_B

    COPY /Y "F:\software\test.1" "F:\backup_*\test.1"

    will the above copy "F:\software\test.1" to
    "F:\backup_1\test.1"
    "F:\backup_A\test.1"
    "F:\backup_1_A\test.1"
     
  2. BobSheep

    BobSheep MDL Guru

    Apr 19, 2010
    2,330
    1,377
    90
    I think it will only work if the wildcard is in the from and to filenames and in the same position.

    rename "test*.*" "fish*.*"

    I could be wrong on this though. Why not try it and see.