ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Delete folders within directory but not the files within the folder

<< < (2/3) > >>

Target:
you should be able to find a solution in the coding snacks section.

others may be able to point you to specific threads, or search the forum as this functionality (or very near) has been requested several times :Thmbsup:

skwire:
Since you're already using Windows Explorer, you can simply use the find/search functionality to do what you want.  Press F3, enter *.* and do a quick search.  Then, just highlight all the found files and drag them into your top-level folder.

4wd:
Since you're already using Windows Explorer, you can simply use the find/search functionality to do what you want.  Press F3, enter *.* and do a quick search.  Then, just highlight all the found files and drag them into your top-level folder.
-skwire (February 11, 2013, 07:29 PM)
--- End quote ---

Are you saying I just wasted my time creating Move Everything Recursively, Delete Empty ?

MERDE!    ;D


--- Code: AutoIt ---#Region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_Icon=1360654278_56056.ico#AutoIt3Wrapper_UseUpx=n#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****#cs ----------------------------------------------------------------------------  AutoIt Version: 3.3.8.0 Author:         4wd  Script Function:        Move Everything Recursively, Delete Empty (MERDE) Icon from: http://www.iconfinder.com/icondetails/56056/32/crap_poo_shit_turd_icon #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <RecFileListToArray.au3>#include <Array.au3> If $CmdLine[0] = 0 Then Exit$srce = $CmdLine[1] $files = _RecFileListToArray($srce, '*', 1, 1, 1, 2)If Not IsArray($files) Then        MsgBox(48, 'MERDE!', 'No files found!', 10)        ExitEndIf _Valmorphanize($files, $srce) $folders = _RecFileListToArray($srce, '*', 2, 1, 1, 2)If Not IsArray($folders) Then Exit_PruneEmpty($folders)  Func _Valmorphanize($temp, $path)        For $i = 1 To $temp[0]                If $path <> StringLeft($temp[$i], StringInStr($temp[$i], "\", 0, -1) - 1) Then                        $newdest = _AutoRename($path & '\' & StringRight($temp[$i], StringLen($temp[$i]) - StringInStr($temp[$i], "\", 0, -1)))                        FileMove($temp[$i], $newdest)                EndIf        NextEndFunc  Func _PruneEmpty($temp)        For $i = 1 To $temp[0]                If DirGetSize($temp[$i]) = 0 Then DirRemove($temp[$i], 1)        NextEndFunc  ; Function courtesy of KaFu:; http://www.autoitscript.com/forum/topic/125602-filename-exists-auto-rename-making-too-many-duplicates/#entry871942Func _AutoRename($sFilename)        $sFilename_Buffer = $sFilename        $i = 1        While FileExists($sFilename)                If $i = 1 Then                        $sFilename = StringLeft($sFilename_Buffer, StringInStr($sFilename_Buffer, "\", 0, -1)) & "Copy of " & StringRight($sFilename_Buffer, StringLen($sFilename_Buffer) - StringInStr($sFilename_Buffer, "\", 0, -1))                Else                        $sFilename = StringLeft($sFilename_Buffer, StringInStr($sFilename_Buffer, "\", 0, -1)) & "Copy of (" & $i & ") " & StringRight($sFilename_Buffer, StringLen($sFilename_Buffer) - StringInStr($sFilename_Buffer, "\", 0, -1))                EndIf                $i += 1        WEnd        Return $sFilenameEndFunc
Put the executable in the %UserProfile%\SendTo directory and then you can just right-click->Send To MERDE.exe on the directory you want to turn to merde  :)

eg.

From this:



Do this:



To get this:

FrothyAss:
Thank you! Works perfectly, 4wd! Exactly what I needed.

For those with a problem with it (none yet, I am aware), put the unzipped files into a folder altogether, move the folder to desired location, and make a shortcut of the executable (MERDE.exe). Move the shortcut to SendTo folder, link below for how to get there.

For Windows 7 users, http://mintywhite.com/windows-7/7customization/customize-windows-seven-7-send-to-menu-how-to/

How do I move this topic to "Finished Programs"?

skwire:
Thank you! Works perfectly, 4wd! Exactly what I needed.-FrothyAss (February 11, 2013, 09:35 PM)
--- End quote ---

Nicely done, 4wd.   :Thmbsup:

For those with a problem with it (none yet, I am aware), put the unzipped files into a folder altogether, move the folder to desired location, and make a shortcut of the executable (MERDE.exe). Move the shortcut to SendTo folder, link below for how to get there.-FrothyAss (February 11, 2013, 09:35 PM)
--- End quote ---

May I suggest SendToSendTo?  =]  http://whyeye.org/projects/sendtosendto/

How do I move this topic to "Finished Programs"?-FrothyAss (February 11, 2013, 09:35 PM)
--- End quote ---

I take care of that.   :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version