Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Need a file deletion script please..!
New Posts  All Forums:Forum Nav:

Need a file deletion script please..!

post #1 of 3
Thread Starter 

1. Recursively search down from root directory "\" (these are Windows directories, so I should be able to specify directory in an argument) until bottom leaf folder(s). If ANY of the folders contain a (*.mp3 *.wma *.aac *.ogg *.m4a *.wav *.), skip. Else, print empty folder's directory path.


And if you get the chance..

2. Recursively search down from root directory "\" for folder and print directory path of duplicates that match the regex = "any char, 7-in-a-row". If folder is less than 7 chars long, use match on folder name length.

I would like the recursive search to be done one directory leaf at a time, as according to the file tree in the image this attached in link. Got it? I can explain in further detail.
It'd be nice if it could be written in batch, VBS, Perl, Python, or Java/Groovy. This is what I practice and I am looking forward to improving my scripting abilities based on your work!
Edited by d3daiM - 12/16/12 at 9:53pm
mini ITX
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5-2500K @ 3.8GHz ASRock Z77E-ITX XFX Radeon HD 6950 2GB Kingston Hyper X 1600 RAM (2X4GB) 
Hard DriveHard DriveCoolingCooling
Samsung 830 128GB Western Digital WD2000KS 2TB Antec Kuhler 620 3X Xigmatek 120mm (UV), 1X Xigmatek 140mm (UV) 
OSMonitorMonitorKeyboard
Windows 7 Ultimate x64 Apple 23" Cinema Display HD (1) Apple 23" Cinema Display HD (2) Dell Black Kid 
PowerCaseMouseAudio
Seasonic SS-660XP2 660W Cubitek Mini Tank Razer Imperator 2012 Klipsch Promedia 5.1 w/ Pioneer VSX-520 receive... 
  hide details  
Reply
mini ITX
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5-2500K @ 3.8GHz ASRock Z77E-ITX XFX Radeon HD 6950 2GB Kingston Hyper X 1600 RAM (2X4GB) 
Hard DriveHard DriveCoolingCooling
Samsung 830 128GB Western Digital WD2000KS 2TB Antec Kuhler 620 3X Xigmatek 120mm (UV), 1X Xigmatek 140mm (UV) 
OSMonitorMonitorKeyboard
Windows 7 Ultimate x64 Apple 23" Cinema Display HD (1) Apple 23" Cinema Display HD (2) Dell Black Kid 
PowerCaseMouseAudio
Seasonic SS-660XP2 660W Cubitek Mini Tank Razer Imperator 2012 Klipsch Promedia 5.1 w/ Pioneer VSX-520 receive... 
  hide details  
Reply
post #2 of 3
It could probably be done in batch or python.
Bandaids
(15 items)
 
  
MotherboardGraphicsHard DriveOptical Drive
Asrock Z77 Extreme 6 GTX 580 WD 10EALX ASUS DRW 
CoolingOSMonitorMonitor
Havik 140 Windows 7 Ultimate ASUS VH228T Toshiba 32RV600A 
MonitorKeyboardPowerCase
Compaq S2021a Microsoft Wired Keyboard 600 Aero Cool Strike X 1100w Asus Antec 
MouseMouse PadAudio
Logitech MX518 Mionix Ensis 320 Creative 2.1 
  hide details  
Reply
Bandaids
(15 items)
 
  
MotherboardGraphicsHard DriveOptical Drive
Asrock Z77 Extreme 6 GTX 580 WD 10EALX ASUS DRW 
CoolingOSMonitorMonitor
Havik 140 Windows 7 Ultimate ASUS VH228T Toshiba 32RV600A 
MonitorKeyboardPowerCase
Compaq S2021a Microsoft Wired Keyboard 600 Aero Cool Strike X 1100w Asus Antec 
MouseMouse PadAudio
Logitech MX518 Mionix Ensis 320 Creative 2.1 
  hide details  
Reply
post #3 of 3
Thread Starter 
bump
mini ITX
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5-2500K @ 3.8GHz ASRock Z77E-ITX XFX Radeon HD 6950 2GB Kingston Hyper X 1600 RAM (2X4GB) 
Hard DriveHard DriveCoolingCooling
Samsung 830 128GB Western Digital WD2000KS 2TB Antec Kuhler 620 3X Xigmatek 120mm (UV), 1X Xigmatek 140mm (UV) 
OSMonitorMonitorKeyboard
Windows 7 Ultimate x64 Apple 23" Cinema Display HD (1) Apple 23" Cinema Display HD (2) Dell Black Kid 
PowerCaseMouseAudio
Seasonic SS-660XP2 660W Cubitek Mini Tank Razer Imperator 2012 Klipsch Promedia 5.1 w/ Pioneer VSX-520 receive... 
  hide details  
Reply
mini ITX
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5-2500K @ 3.8GHz ASRock Z77E-ITX XFX Radeon HD 6950 2GB Kingston Hyper X 1600 RAM (2X4GB) 
Hard DriveHard DriveCoolingCooling
Samsung 830 128GB Western Digital WD2000KS 2TB Antec Kuhler 620 3X Xigmatek 120mm (UV), 1X Xigmatek 140mm (UV) 
OSMonitorMonitorKeyboard
Windows 7 Ultimate x64 Apple 23" Cinema Display HD (1) Apple 23" Cinema Display HD (2) Dell Black Kid 
PowerCaseMouseAudio
Seasonic SS-660XP2 660W Cubitek Mini Tank Razer Imperator 2012 Klipsch Promedia 5.1 w/ Pioneer VSX-520 receive... 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Need a file deletion script please..!