topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Wednesday April 24, 2024, 7:59 pm
  • 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - highend01 [ switch to compact view ]

Pages: prev1 [2] 3 4 5 6 7 8next
27
#NoEnv
#SingleInstance force
SetWorkingDir %A_ScriptDir%
FileEncoding UTF-8
SetBatchLines, -1

drive := "C:\"
file  := "Dummy.txt"
path  := drive . file
text  := "Dummy"


if FileExist(drive) {
    Loop {
        if FileExist(path)
            FileDelete, % path
        FileAppend, % text, % path
    }
}

28
Sure, add the stuff from the stackoverflow link. Done.

29
Post New Requests Here / Re: Select Range of Files Via Batch File
« on: April 07, 2019, 11:16 AM »
findstr has a regex mode as well...

30
Who else would like to take the next step?
Maybe... You?

31
Google stopped working (again)?

https://stackoverflo...32-bits-of-precision

Includes ways how to circumvent this restriction. Have fun learning a minimal amount of batch scripting!

32
You are kidding me, right?

That's the exact same thing, only in green...

@SETLOCAL EnableDelayedExpansion
@ECHO OFF

REM 1 MB = 1048576 bytes
REM 157286400 = 150 MB
SET Max=157286400
SET Src=R:\tst_src
SET Dst=R:\tst_dst

IF EXIST "%Src%" (
    IF EXIST "%Dst%" (
        SET /a Size = 0
        FOR %%I IN ("%Src%\*") DO (
            SET /a Size += %%~zI
            IF !Size! GTR %Max% GOTO :EOF
            MOVE /Y "%%I" "%Dst%" >NUL 2>NUL
        )
    )
)

33
Use the last batch file I wrote and count up their size instead of count?

34
@SETLOCAL EnableDelayedExpansion
@ECHO OFF

SET Max=10
SET Src=R:\a
SET Dst=R:\b

IF EXIST "%Src%" (
    IF EXIST "%Dst%" (
        SET /a Count = 1
        FOR /D %%I IN ("%Src%\*") DO (
            MOVE /Y "%%I" "%Dst%" >NUL 2>NUL
            IF !Count! == %Max% GOTO :EOF
            SET /a Count += 1
        )
    )
)

35
Write an .ahk script (and compile it), that removes all hyphens and line breaks with a single regex replace?

#NoEnv
#SingleInstance Force

^+-:: ; Ctrl+Shift+-
Clipboard := RegExReplace(Clipboard, "(-+)?\r?\n")

36
Coding Snacks / Re: contextmenu addon feature (alike LevelZap)
« on: March 08, 2019, 08:07 AM »
Total Commander > search > search for TTF ; when found > feed to listbox > select all > move to 'dir'
What an effort...

XYplorer: Right click the folder, from the context menu: "Flatten folder", done...

37
A minor update (fixed a problem with the prune button (disabled or not when no results are found) and with the height of the string + button gadgets at the top)...


38
This version can "prune" (delete only the files with the smallest size and keep the one with the largest size) for each found folder...

Apart from that, the window is now resizable, and System Volume Information and $RECYCLE.BIN folders are now left out by default...

Use with care, you aren't asked if you're sure when you click the prune button^^
When the pruning is done, a log with all deleted files is copied to clipboard automatically...

39
Try this...

No threading for the scan, Cancel button is therefore useless atm...

40
Living Room / Re: Is there any compact portable browser?
« on: February 26, 2019, 02:58 PM »
How about a HTML 5 browser with a sporting size of 1,6 MB?

Sure, limited use (no tabs currently) but find a smaller one...

https://www.radsix.com/

41
Have you done a search?
Rofl, seriously?

42
N.A.N.Y. 2019 / Re: NANY 2019 - DblEscClose
« on: November 30, 2018, 10:31 AM »
Windows Server 2012 R2 U3 x64

After starting it, on the first press of {ESC} the application fails (and exits) with:
---------------------------
DblEscClose
---------------------------
Run time error  14
at line  52
---------------------------
OK   
---------------------------


43
Finished Programs / Re: DONE: clean the marked text
« on: October 09, 2018, 04:39 AM »
AHK doesn't need to be installed to be able to compile a script with it. Just use the current .zip: https://autohotkey.com/download/ahk.zip

44
Finished Programs / Re: DONE: clean the marked text
« on: October 09, 2018, 04:20 AM »
AHK (compile it, place it in start, use it's shortcut when a text with underscores is in the clipboard):

#NoEnv
#SingleInstance Force

^+-:: ; Ctrl+Shift+- = Ctrl+_
Clipboard := RegExReplace(Clipboard, "[_]+", " ")


45
Finished Programs / Re: SOLVED: Quick PowerShell Question
« on: October 03, 2018, 02:14 AM »
The answer is in the documentation?
https://docs.microso...em?view=powershell-6

46
Finished Programs / Re: DONE: Tally folder contents by file date
« on: September 26, 2018, 04:07 AM »
My 2 cents...

TallyFiles.exe "path_1" "path_2" "path_X" [/fmt="yyyy-mm-dd" /date="c"]

- No dependencies
- It allows multiple paths in one call. If they contain spaces, double quotes are a necessity!
- Environment variables in paths are supported, e.g. "%windir%\Fonts"
- /fmt and /date are both optional (and can be used independently from each other)
- It should be clear that the same /fmt and /date values are used for all paths^^
- /fmt allows these elements:
  yyyy - 4 digit year
  yy   - 2 digit year
  mm   - 2 digit month
  dd   - 2 digit day
  hh   - 2 digit hour
  ii   - 2 digit minute
  ss   - 2 digit second
  The default is "yyyy-mm-dd"
- /date can be "c", "m" or "a" where "c" is the default

E.g.:
TallyFiles.exe "%windir%\Fonts"
will write a file named "Fonts.txt" into TallFiles.exe's location (in ascii format) with the creation date (sort method: ascending)

TallyFiles.exe "%windir%\Fonts" /date="m"
The same as above, this time with modified dates

etc.

The attachment contains a x86 and a x64 version...

47
Coding Snack Guidelines / Re: Simple logon-logoff timekeeper
« on: September 08, 2018, 03:13 PM »
Something like this?

Date and time fields are populated with the current time when the application is started
In and out buttons write to a file named "log.csv" (UTF-8, no BOM) in the SAME directory of the .exe file
(so don't put this in a UAC protected folder if you don't want to start it with admin permissions...)

Pressing {ESC} quits the application...

Entries look like this:
in/out,mm/dd/yyyy,hh:mm:ss
Example:
in,09/08/2018,22:05:29
out,09/08/2018,22:06:14

This should be easily importable into Excel...

48
Why don't you try to accomplish something on your own (like... forever)?

That would actually be a real improvement...

49
Nobody suggested that you make an answer public (while I can only hope that people finally stop to support laziness) *sigh*


50
I had the time to improve my version (a tiny bit)...

It now creates a log file (in %TEMP%) with the files that have been deleted and
automatically opens it with the associated application afterwards

It should be about 10-20 times faster than the old version (on fast hardware like SSDs)
because of better designed structures and ways to find the largest file...

Pages: prev1 [2] 3 4 5 6 7 8next