Solved Delete folders and keep the content

Hymer

New member
Local time
4:07 AM
Messages
2
I have a boring task. I make an archive of several years of a daily newspaper, and every number of this newspaper i laying in its own folder on the CD I've got. So I open the folders one by one and draw the only pdf-file inside for collecting them.:geek: My wish is to delete all the maps at once and keep the contents. Is it possible? Or is there any other solution to get by this Cinderella-job?
 

My Computer

OS
None>
Providing that they are all PDF files, I'd run a search for .pdf and then copy them all into a single folder. Then delete the folders and original files - if needed.

This may not be the best solution. Its a little risky as well.

You cant delete all the folders without deleting the content. You would have to move the files first.


Dave
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i7 2600K (O/C 4.7GHz)
Motherboard
Asus ROG Maximus IV Extreme-Z - Intel Z68 Chipset
Memory
8GB Corsair Vengeance LP, DDR3, 1600Mhz
Graphics Card(s)
Nvidia GTX 460 Graphics Card
Sound Card
Onboard
Monitor(s) Displays
Dell E228WFP
Hard Drives
2 x 500GB Samsung SpinPoint Drives (1 for OS, 1 for Data and Apps)
PSU
CoolerMaster 1000W
Case
CoolerMaster HAF
Cooling
Air
Internet Speed
Fibre - 60MB Down, 30MB Up
Antivirus
ESET NOD32 Antivirus
This was a very good idea! :) There are only pdf files. I need no delete anything, only to search .pdf on the CD and then draw the collection over to an own folder. Thank you very much, Dave, you saved my time!
 

My Computer

OS
None>
My pleasure :)

Dave
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i7 2600K (O/C 4.7GHz)
Motherboard
Asus ROG Maximus IV Extreme-Z - Intel Z68 Chipset
Memory
8GB Corsair Vengeance LP, DDR3, 1600Mhz
Graphics Card(s)
Nvidia GTX 460 Graphics Card
Sound Card
Onboard
Monitor(s) Displays
Dell E228WFP
Hard Drives
2 x 500GB Samsung SpinPoint Drives (1 for OS, 1 for Data and Apps)
PSU
CoolerMaster 1000W
Case
CoolerMaster HAF
Cooling
Air
Internet Speed
Fibre - 60MB Down, 30MB Up
Antivirus
ESET NOD32 Antivirus
You could create a .cmd script, create a .txt file with the below contents and save, then rename file and change extension to .cmd and hit enter, agree with extension name change. I call mine "dissolve.cmd". If you are not showing extensions, then you need to unhide the extensions first.

I put the script in my SendTo folder so I can right click any folder and dissolve the folder and the contents move to the present folder. Ex: C:\path\myfile.doc >> C:\myfile.doc.

This is a little advanced and if there are subfolders it will dissolve them all so you could acidentally make a mess if you didn't know what you were doing.

Set _Source=%*
For %%I in (%_Source%) Do (
For /F "usebackq tokens=*" %%J In (`DIR /B /AD ""%_Source%""`) Do
Move /-Y "%%~I\%%J" "%%~dpI"
Move /-Y "%%~I\*.*" "%%~dpI"
RD "%%~I"
)
::pause
 

My Computer

Computer type
PC/Desktop
OS
fu
Back
Top