I got this batch script on the web for listing files with their sizes and there is one part I do not fully understand, so I was hoping someone could explain it to me
set /A Total=0, Cnt=0
for /F "tokens=*" %%A in ('dir %1 /S /B /A-D') do call :show "%%A"
set "Size= %~z1"
echo %~f1 %~t1 %Size:~-10% >> c:\test\files.txt
The part I don't understand is in the 3rd last line of the script:
Is the whole variable everything between the two % characters?
I understand that the %Size is the Size variable which is set to the file size in the previous line, but I don't understand what the :~10% bit is doing - so please advise
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Learn several ways to interact with files and get file information from the bash shell.
ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…