Run all batch files that exist within a folder?

Qdeathstar

New Member
Messages
7
Hello,

I recently suffered an SSD failure, but luckily i was able to recover the files using @active's boot disk. The issue is that the files i recovered require that their file names be long, @active saves them as short file names due to DOS limitations, and creates a batch file that i can run to return them to their previous (long) name.

The issue is i have over 500 folders, and this will take a very long time.

Is there away to run all batch files in a folder (including subfolders) or is there a way to run all batch files with a certain name? (they are all named !_RENAME.bat).


Any tips or ideas would be appreciated!
 

My Computer

System One

  • OS
    Windows 8 Pro with WMC
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Build
    CPU
    i7 4770k
    Motherboard
    Asus z97
    Memory
    16gb
    Graphics Card(s)
    Nvidia GeForce 760
    Sound Card
    Sound Blaster Z
    Monitor(s) Displays
    TV
    Screen Resolution
    1080p
    Hard Drives
    2TB HD
    250gb SSD
    PSU
    1000w
    Cooling
    fans
See the /R switch in For command for command prompt

Microsoft Corporation




The way to get them all would be to put the folders all underneath one folder. Like C:\MyBatches or something.. if they are not already under one root folder. Open a command prompt in drive C: then do
cd \MyBatches
for /R %s in (*.bat) do %s

Edit: Also you can look in the .bat. If it is a simple command to change to long filenames you can do it directly. But since the bats are already there... I would sample a few and make sure there's nothing that looks dangerous like del *.* or anything suspicious.
 

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad
Back
Top