topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 5:25 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: Removing zero length files recursively at command-line  (Read 12637 times)

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
In the process of TRYING to use SharePoint I have ended up with a LOT of zero length  (0 kb) files scattered all over a folder that has a total of over 50k small files in it.  These have various names and most if not all may have a space in the filename.  You would think there would be a simple command-line argument to remove all files of zero length.  If there is I can't find it.  And what I did locate used the "find" command with some arguments that may no longer be valid. 

I just need a way to do the scanning and removing of these empty files in various sub-folders and sub-sub-folders of a "c:\Data" directory.
The variations on the Find command only return errors and some of the options may be invalid in newer Windows OS systems even at a command prompt.  have to run this on more than one system,  some running  Windows 7 some 8.1.

Code: Text [Select]
  1. find . -empty -type f -delete

as well as
Code: Text [Select]
  1. find . -type f -size 0 -delete

These examples are supposed to work but don't
Not only do I get a config error but I don't see any way for this to scan recursively when run from a command prompt inside the Data folder.
It might be a better idea to MOVE those Zero length files to a folder named "C:\Zero" instead of outright deletion.   Just in case.  Paranoia is a good thing some times. :-\

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #1 on: July 13, 2014, 05:47 AM »
Code: Text [Select]
  1. REM Del0Files.cmd
  2. @echo off
  3. for /f "usebackq tokens=*" %%a in (`dir /os /b /s /a-d-s-h-l "%~1\*.*"`) do (if "%%~za"=="0" del "%%~a")

Call as:

Del0Files.cmd <path>

Change the:

del "%%~a"

to:

move "%%~a" "C:\Zero\%%~na"

if you want to move instead.

Here's a recursive commandline delete empty directory that I got from StackOverflow, (IIRC):

Code: Text [Select]
  1. rem Del0Dir.cmd <directory>
  2. @echo off
  3. for /f "usebackq delims=" %%a in (`dir /ad /b /s "%~1" ^| sort /r`) do rd "%%~a" 2>NUL

For cleaning up the dirs after you delete all the files :)

Test it first, the rd should fail if the directory isn't empty thus skipping it.
« Last Edit: July 13, 2014, 06:00 AM by 4wd »

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #2 on: July 31, 2014, 11:41 AM »
OK then kick me now while I'm down :) but I cannot get this next on to follow the focus of the calls.
Simple, easy, and worked perfect but created my folder it root C.
trying to automate a few things that I have pieced together most of on DC over time.
Using Clavier+ I set alt+F5 to run a batch file named auto.bat that was supposed to allow me to input a few characters which should be used to create a folder at the location where my prompt is when I run the Al+F5.   I knew it wasn't going to work but still not sure how to get the file to be created where I run the hotkey.
It could be inside of any one of 30 different root folders.  It then copies the contents of a generic starter setup with al the necessary parts and pieces waiting to be customized for that user.
While it did "Thankfully"! :o create the subfolder properly before dumping about 1000 misc. files all over the place, it did so at root C:
I have only looked for 15 minutes trying to find the (probably simple) method to get the focus of the command to be inside the folder I am in when I run the hotkey, I can't find anything that appears to work that way.  I cannot write the path into the batch as I will be using it in various places every time I call with ALT=-F5.   :-\  I just had a better idea to save room, if I could unzip a zipped copy of all the required stuff that would probably be even better.
Once this part is working, I have to use the same name to create a MySQL Database from a command line.  This something I had help getting to work a while back  have to see who to thank for that one.  Once I put it all together, I should be able to use a single hot key to setup the whole thing.

Only thing let is finding the best image utility to resize an image to a specific size (in pixels) png file with as little loss as possible,  So far, PAINT has been doing a pretty good job since I may have to start out with a jpg or whatever they send me.  I found a few Online utilities but prefer to work with all programs and files "in hand"  I'm just tossing this out to see if anyone has a favorite that I have not yet tried.  Most of them that are any good are far too complicated.  I just need to take a 380x260 (or ?) pixel jpg photo and change it to a 742x350pixel png file and not lose so much resolution  cant ell what it was to start with.   :D  I usually end up looking for a similar but larger one I can shrink instead.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #3 on: July 31, 2014, 03:30 PM »
OK, from here:

OK then kick me now while I'm down :) but I cannot get this next on to follow the focus of the calls.

to here:

Once I put it all together, I should be able to use a single hot key to setup the whole thing.

I'm going to sum up with  :huh:

I just need to take a 380x260 (or ?) pixel jpg photo and change it to a 742x350pixel png file and not lose so much resolution  cant ell what it was to start with.   :D  I usually end up looking for a similar but larger one I can shrink instead.

SmillaEnlarger v0.8.0 - last Windows version

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #4 on: July 31, 2014, 11:15 PM »
yep.  I feel just like that too,  And I am supposed to know at least what I am trying to ask.  Woke up with what I THINK may be the only adult onset case of Pinkeye I know of.  Had to get some killer drops for my eyes and some other stuff that between the two I cant see what I am even typing.

When you use "set" in a batch file to allow input for the data stored in a variable like "set %name% subdirectory"
I see the word subdirectory and enter the characters I want to use    like "nextone".
then use that to create the subdirectory with the next line md %name%

At the time I am calling this batch, I am already in the place I want to create the subdirectory.  This location varies and so do the name and the path to get where I would be is too long to have to type in the whole thing.  My "plan" was for this batch file to create the sudbir using the entered name right there where I called it from.
I linked the batch file itself to be run when I press AltF5 as a hotkey sequences .  Everything works fine except the subdir gets created under top level c:\ instead of Way down the path where I am running it from.
So .  I tried using "%~dp0" but that was a no go as well.

It could be that because I located the batchfile (I just called it auto.bat) in c:\ so I would be in the default path no matter where I was when I pressed AltF5 that maybe I am stuck.  I was hoping it would use the location of my "cursor" a a reference point and create the subdirectory there.

and thanks for the "enlarger"  I have never seen that one!   :Thmbsup:
Speaking of SEE.  I can see a bit better now :)
« Last Edit: July 31, 2014, 11:18 PM by questorfla, Reason: too many typos »

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #5 on: August 01, 2014, 12:04 AM »
set /p input=Entername  :
md %input%
cd %input%
set var=%cd%
7z e c:\preload.zip
echo %var% > path.txt
exit


OK that has got to be close now.  I was thinking too hard on the first step.  don't need to know the path at that point.
And even later with %var%   I don't need the exact path  yet   but I will need part of it eventually to create the "http://www" path so it can be accessed from a browser.
this is going to be a custom site installer utility when completed.  has a few more steps before done :)

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #6 on: August 01, 2014, 06:04 AM »
It could be that because I located the batchfile (I just called it auto.bat) in c:\ so I would be in the default path no matter where I was when I pressed AltF5 that maybe I am stuck.  I was hoping it would use the location of my "cursor" a a reference point and create the subdirectory there.

Correct, the "home" directory becomes the location of the command file because of the way you are calling it.

AFAIK, there's no way to get the current directory from a new invocation of CMD when going via a third party program unless the current directory is passed as a parameter.  Which doesn't seem to be possible as Clavier+ doesn't provide for determining where it's been invoked from.

An alternative would be a small external program that provides the path of the current active CLI window when it's called.

BTW, are you calling this from an active CLI window or from Explorer, (or something else)?

Just mucking around:
Code: Text [Select]
  1. rem qf666.cmd [file]
  2. rem
  3. rem Where [file] = optional text file with one dir to create per line
  4. @echo off
  5. rem  If file passed as arg, use it if it exists, fall back to asking
  6. rem  if it does not.
  7. if "%~1"=="" goto :Request
  8. if not exist "%~1" (
  9.   echo File does not exist
  10.   echo.
  11.   goto :Request
  12. )
  13. for /f "usebackq tokens=*" %%a in (`type "%~1"`) do (call :Extract "%%a")
  14. goto :END
  15.  
  16. :Request
  17. set /p newdir=Entername  :
  18. if "%newdir%"=="" goto :END
  19. call :Extract "%newdir%"
  20. goto :END
  21.  
  22. :Extract
  23. set ndir="%~1"
  24. md %ndir%
  25. pushd %ndir%
  26. 7za.exe e C:\preload.zip
  27. cd > path.txt
  28. popd
  29. goto :EOF
  30.  
  31. :END
« Last Edit: August 01, 2014, 08:59 AM by 4wd »

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #7 on: August 01, 2014, 10:10 AM »
not sure if mine came ahead of yours or which.  you are probably right in the end.  I have not yet added back the 'call from' AltF5  The script as written was located in the folder I have been testing with.

Just wondering, I have started playing around with AHK and thought maybe I could write the whole thong using AHK to get it started.  Maybe that would get around the need a batch file to be "located" somewhere specific.  Or, use the first step to copy the batch script to the folder in which I need to run it?  This will be complex enough in th end that I hope I can convert the whole thing to an executable.  Each step is always required.  One of my previous projects was something that I could run to create a working list of clickable hyperlinks to send the "BOSS" that I had to run every month to add any new "mini-sites".  Doing it like this, I could add the link to the list as the site was created.

And rather than fight the inevitable, I am also going to find a way to convert the few data-tables it needs from using MyISAM to using INNODB so I can upgrade the version of MySQL I have to use now.  5.5 is as high as I can go and still get support for MyISAM. 

However:  As a side-note, I recently ran across some references to a project called ARIA that is supposed to be a similar setup which does still support MyISAM.  For all the reports of why InnoDB is better, I never had any problems with MyISAM and without learning all the ins and outs of which calls I would need to modify as well as why I would need to do it, it might be easier to simply use ARIA.  I just found this reference last night by accident and have not looked into it at all    Using a different support engine could bring on other problems I don't want to deal with.  IF it turns out to be a simple "change the name' of the program used to create the tables, then I can manage that (I hope).

The scripting for the DB creation and handling is all done in a ".php" file.  This is not my 'forte'" (Nor even my "six-te'" )    8)  But it might bear looking into.

These are all sub-sites of a "Mothership"  Maybe "mother-site" is more appropriate.   Not all awake yet  :-\  )

As long as the databases hang together once created, if "PhpMyAdmin" can deal with ARIA then I might be able to keep what I have


4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #8 on: August 01, 2014, 02:14 PM »
Instead of using a hotkey, why not just call it p.cmd and stick it in the path?

When run from CLI, still takes two keypresses, p then ENTER - probably takes the same amount of time to trigger also.

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #9 on: August 01, 2014, 02:28 PM »
I hate it when nothing works right :( >:(
it MIGHT work if I created some proper links.  Or exited at a cmd prompt at he location where I want the new directory created.
the only way I can get the cmd to run is to type it in at start>run. I think it would run whether cmd or bat anyway.   Not used to having to do things this way.  it still created the directory at c:\
 (or wherever the xxx.cmd or xxx.bat is located).  I need to shift the focus of the run/create command to the location that I am currently opened to which is where I need that new directory to be created and loaded.  The 7z  parameter I had to change to "x" instead of "e" of course.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #10 on: August 01, 2014, 02:40 PM »
I'm not familiar with SharePoint, so bear with me.  When you say you want the hotkey program or batch to start in the location you are in, what are you in exactly?  I'm wondering if there may be a way to use the clipboard to get the folder location or whatnot.

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #11 on: August 01, 2014, 04:53 PM »
PS:  Miles ahead.  Excuse the re:use of my original post, the SharePoint problem was resolved in the 2nd post and i just kept going.  Hated to wast a good thread :)
To be honest, anything to do with SharePoint is probably going to be a dead end:  WAY too many issues to deal with.  So.. I Segued into creating an automated script used for creation of a custom very specialized website-app.  More la web-app than a website.   Just trying to get each step to run as a script.

I did finally get the last one to work but not as easily as i would like
using Shift plus right click  can open a  command prompt in the directory I want the folder created in
then run the batch file as is and it works fine even though it is located at c:\.  It let me enter the name i wanted and created that folder and unzipped the files into it.  What i wanted was a way to pass the current location i am in when i press a hot-key combo to the batch file.  dropping out to a command prompt wasn't that bad,  it just seems unnecessary.  
Heck this part is easy,  next this i have to do is use that SAME name to change a line of text in two of the files that go in that directory, as well as use that same name to create a MySQL database.  The command line for MySQL I do have somewhere.  None of this is "essential" i am just trying to see if it would be possible to automate the whole process since it never changes and i have to do it several times a day
« Last Edit: August 01, 2014, 05:01 PM by questorfla, Reason: spelling »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #12 on: August 01, 2014, 06:11 PM »
I'm not sure about the second part but if you have an Explorer folder window open and an existing folder selected then an ahk script would be able to get the folder path(if it is a regular folder, not Computer or some other shell object) and chop off the path to the last backslash to get the local folder name.  It could use ShellExecute to run the batch file with the folder path as working directory etc..

So if that part is worth doing depends how much typing you have to do for the manual command prompt bit.  Only you would know if your time is better spent on the next stage or making the solved task a bit easier.  :)

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #13 on: August 02, 2014, 05:15 AM »
The problem I'm having trying to understand your scenario is you still haven't described the methodology you use before you run the command file.

ie.
a) Do you run this from a CLI open at the required path, (in which case put the command file in the command PATH somewhere, or add to the PATH, and call it without using a hotkey).
b) Do you run this from Explorer somehow, (in which case use my program here to copy the current path to the clipboard and then use GetClip in your command file to retrieve it when you run it via hotkey).
c) Running it from the Start->Run prompt, (in which case use a real CLI :) ).

Or the alternative is write something in a language that will let you do exactly what you want.

Addendum: qExClip, a slightly modified version of ExClip.

Code: AutoIt [Select]
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_UseUpx=n
  3. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  4. ; http://www.autoitscript.com/forum/topic/89833-windows-explorer-current-folder/page__st__40#entry973904
  5. #include <Array.au3>
  6.  
  7. Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ComErrFunc")
  8.  
  9. If $CmdLine[0] = 1 Then
  10.         $sCmd = $CmdLine[1]
  11.         _ExClip(True)
  12.         _ExClip(False)
  13.  
  14.  
  15. Func _ExClip($temp)
  16.         $hExplr = WinActive("[REGEXPCLASS:(Explore|Cabinet)WClass]")
  17.         If $hExplr <> '' Then
  18.                 $aSelection = _ExplorerWinGetSelectedItems($hExplr)
  19. ;~              _ArrayDisplay($aSelection)
  20.                 If $aSelection[0] = 0 Then
  21.                         If StringLeft($aSelection[1], 2) <> '::' Then
  22.                                 If Not $temp Then
  23.                                         ClipPut($aSelection[1])
  24.                                 Else
  25.                                         ShellExecute($sCmd, $aSelection[1], $aSelection[1])
  26.                                 EndIf
  27.                         EndIf
  28.                 Else
  29.                         If Not $temp Then
  30.                                 ClipPut($aSelection[2])
  31.                         Else
  32.                                 ShellExecute($sCmd, $aSelection[2], $aSelection[2])
  33.                         EndIf
  34.                 EndIf
  35.         EndIf
  36. EndFunc   ;==>_ExClip
  37.  
  38.  
  39.  
  40. ; ==========================================================================================================================
  41.  
  42. ; Func _ObjectSHFolderViewFromWin($hWnd)
  43. ;
  44. ; Returns an 'ShellFolderView' Object for the given Window handle
  45. ;
  46. ; Author: Ascend4nt, based on code by KaFu, klaus.s
  47. ; ==========================================================================================================================
  48.  
  49. Func _ObjectSHFolderViewFromWin($hWnd)
  50.         If Not IsHWnd($hWnd) Then Return SetError(1, 0, 0)
  51.         Local $oShell, $oShellWindows, $oIEObject, $oSHFolderView
  52.  
  53.         ; Shell Object
  54.         $oShell = ObjCreate("Shell.Application")
  55.         If Not IsObj($oShell) Then Return SetError(2, 0, 0)
  56.  
  57.         ;   Get a 'ShellWindows Collection' object
  58.         $oShellWindows = $oShell.Windows()
  59.         If Not IsObj($oShellWindows) Then Return SetError(3, 0, 0)
  60.  
  61.         ;   Iterate through the collection - each of type 'InternetExplorer' Object
  62.  
  63.         For $oIEObject In $oShellWindows
  64.                 If $oIEObject.HWND = $hWnd Then
  65.                         ; InternetExplorer->Document = ShellFolderView object
  66.                         $oSHFolderView = $oIEObject.Document
  67.                         If IsObj($oSHFolderView) Then Return $oSHFolderView
  68.                         Return SetError(4, 0, 0)
  69.                 EndIf
  70.         Next
  71.  
  72.         Return SetError(-1, 0, 0)
  73. EndFunc   ;==>_ObjectSHFolderViewFromWin
  74.  
  75. ; ==========================================================================================================================
  76. ; Func _ExplorerWinGetSelectedItems($hWnd)
  77. ;
  78. ;
  79. ; Author: klaus.s, KaFu, Ascend4nt (consolidation & cleanup, Path name simplification)
  80. ; ==========================================================================================================================
  81.  
  82. Func _ExplorerWinGetSelectedItems($hWnd)
  83.         If Not IsHWnd($hWnd) Then Return SetError(1, 0, '')
  84.         Local $oSHFolderView
  85.         Local $iSelectedItems, $iCounter = 2, $aSelectedItems[2] = [0, ""]
  86.  
  87.         $oSHFolderView = _ObjectSHFolderViewFromWin($hWnd)
  88.         If @error Then Return SetError(@error, 0, '')
  89.  
  90.         ;   SelectedItems = FolderItems Collection object->Count
  91.         $iSelectedItems = $oSHFolderView.SelectedItems.Count
  92.  
  93.         Dim $aSelectedItems[$iSelectedItems + 2] ; 2 extra -> 1 for count [0], 1 for Folder Path [1]
  94.  
  95.         $aSelectedItems[0] = $iSelectedItems
  96.         ;   ShellFolderView->Folder->Self as 'FolderItem'->Path
  97.         $aSelectedItems[1] = $oSHFolderView.Folder.Self.Path
  98.  
  99.         ;   ShellFolderView->SelectedItems = FolderItems Collection object
  100.         $oSelectedFolderItems = $oSHFolderView.SelectedItems
  101.  
  102.         #cs
  103.                 ; For ALL items in an Explorer Window (not just the selected ones):
  104.                 $oSelectedFolderItems = $oSHFolderView.Folder.Items
  105.                 ReDim $aSelectedItems[$oSelectedFolderItems.Count+2]
  106.         #ce
  107.  
  108.         For $oFolderItem In $oSelectedFolderItems
  109.                 $aSelectedItems[$iCounter] = $oFolderItem.Path
  110.                 $iCounter += 1
  111.         Next
  112.  
  113.         Return SetExtended($iCounter - 2, $aSelectedItems)
  114. EndFunc   ;==>_ExplorerWinGetSelectedItems
  115.  
  116. Func _ComErrFunc($oError)
  117.         ConsoleWrite("COM Error occurred:" & @CRLF & _
  118.                         "Number: " & @TAB & $oError.number & @CRLF & _
  119.                         "Windescription:" & @TAB & $oError.windescription & @CRLF & _
  120.                         "Description is: " & @TAB & $oError.description & @CRLF & _
  121.                         "Source is: " & @TAB & $oError.source & @CRLF & _
  122.                         "Helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
  123.                         "Helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
  124.                         "Lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
  125.                         "Scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
  126.                         "Retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF)
  127. EndFunc   ;==>_ComErrFunc

Command file, preload.cmd
Code: Text [Select]
  1. @echo off
  2. echo.
  3. rem preload.cmd [folder]
  4. rem
  5. rem Where [folder] = optional folder to create subfolder in
  6. rem
  7. rem  If folder passed as arg, use it if it exists, assume it is run
  8. rem  from CLI in required folder if it does not.
  9. if "%~1"=="" goto :Request
  10. if not exist "%~1" (
  11.   echo Folder does not exist
  12.   echo.
  13.   goto :Request
  14. )
  15. pushd "%~1"
  16.  
  17. :Request
  18. rem There is a SPACE at the end of the follwoing line
  19. set /p newdir=Entername:
  20. if "%newdir%"=="" goto :END
  21. call :Extract "%newdir%"
  22. goto :END
  23.  
  24. :Extract
  25. set ndir="%~1"
  26. md %ndir%
  27. pushd %ndir%
  28. 7za.exe e preload.zip
  29. cd > path.txt
  30. goto :EOF
  31.  
  32. :END

Clavier+ setup:
Clavier.pngDONE: Removing zero length files recursively at command-line

What it does:

ONLY works with Explorer, navigate to a folder or select one and then press the Clavier+ hotkey, (Alt+F5 in this case).

  • Clavier+ calls qExClip.exe with the command file as an argument.
  • qExClip.exe grabs either the path of the active Explorer window or the full path of the first selected item.
  • This path is then passed as an argument to the command file, (preload.cmd in this case), to be used however.  If no args were provided for qExClip then the path is copied to the clipboard.
  • preload.cmd can be run from the CLI also, (with or without args), if passed an arg it will pushd to the folder before continuing with asking folder name, extracting, etc.

OK, the WARNINGS bit:
  • Haven't bothered to check whether any item selected is a file - you can do this easily enough in the command file if really necessary.
  • Haven't bothered testing to see whether the arg passed to qExClip exists, (get it right).
  • Fix any paths to executables/archives in the command file as necessary.

It worked here, doesn't hold that it'll work for you.
« Last Edit: August 02, 2014, 01:01 PM by 4wd, Reason: Cleaned up preload.cmd a bit - could be made shorter but ... meh! »

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #14 on: August 02, 2014, 12:19 PM »
You guys are great :-* (and gals if any are reading)  As you can see, I have too much time on my hands because all my efforts are basically just trying to find different ways to do things when the normal ones work fine.
I think too much.  DC has always been a great sounding board to learn new ways of thinking.  Many of the tools you mention are apps I have never heard of and each has a special niche on the "tool-board" in any programmers workshop.

Heck, I still enjoy writing webpages one html at a time  :o!!

Everything we use is already done in machine-code or binary such that I don't even understand what is done to get from point A to point Z. I can already see the day coming (Like NOW!)  when you will just type in a starting point and the end result and let the system tell YOU how to get there.  Or worse, just DO it without telling us outdated "wet-ware"  users HOW.  But it will work and "the ends" will always justify the "means" in the business world.

This is more like doing crossword puzzles just to feel like humans are still a necessary component in reality.  Just doing it to see if it can be done.  I appreciate the interaction with people who also like to take things apart to see how they work.  Different points of view and alternate ways to reach the same solution.  It doesn't seem to me that there are as many around as there used to be.  To that end, DC has become a fantastic opportunity to meet some really nice people almost all of whom are far better at this than I will ever be.    All of your advice and methods are certainly capable of doing the job.  I save every reply to every post I make just to review them when I need a fresh viewpoint on anything.

I could certainly be more descriptive of the task at hand in a PM but I hate to trash up a Public Forum with the banality of WHY I am even pursuing this.  In the end, it is an effort to do something that shouldn't even be done at all.  Unfortunately, this is what I have to do to make a living at this point.  And I am trying to find ways to at least make it interesting rather than just  ;) a "daily grind"  :'(.

I have yet to find a single "wish list" that I could present on DC and not have at least 4 or 5 people chime in with multiple ways to accomplish every item.  Makes me feel better to know there are still people in the world who will do this.  Not just the ones who use a microwave oven to boil water without ever wondering WHY it gets hot without fire.

Thanks to all of you who offer viewpoints on such banalities as the ones I present.  Your input is appreciated in more ways than just the "How" for a stupid question.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #15 on: August 22, 2014, 03:38 PM »
questorfla, can we move this to the Finished Section?

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: DONE: Removing zero length files recursively at command-line
« Reply #16 on: August 22, 2014, 03:46 PM »
Yes Please.  I am always hesitant to make changes,   :(  Even it I could remember how.  I am sure there are other posts that I need to move as well.