Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

ACQUIRE and @ifilesize

Aug
1,933
71
Hey @Charles Dye;
I tried using the @ifilesize function from the ACQUIRE plugin, but it returns;
Code:
e:\utils>echo %@ifilesize[https://jpsoft.com/downloads/v28/tcmd.exe]
TCC: (WININET) The URL is invalid

e:\utils>echo %_? %?
0 0

I know the file exists, as my UDF works okay;
Code:
e:\utils>function url*
urlsize=%@word[1,%@execstr[curl --head --insecure --silent %1 | find "Content-Length"]]

e:\utils>echo %@urlsize[https://jpsoft.com/downloads/v28/tcmd.exe]
64562800

Joe
Code:
     _x64: 1
   _admin: 1
_elevated: 1

TCC  28.00.12 x64   Windows 10 [Version 10.0.19043.1110]

Processor    Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz   2.60 GHz  (2 processors)
Installed RAM    128 GB
Product ID    00330-80000-00000-AA032
System type    64-bit operating system, x64-based processor
Pen and touch    No pen or touch input is available for this display
Edition    Windows 10 Pro
Version    21H1
Installed on    ‎2021-‎01-‎16
OS build    19043.1110
Experience    Windows Feature Experience Pack 120.2212.3530.0
 
I have not been able to reproduce this:
Code:
C:\>ver /r

TCC  28.00.12 x64   Windows 10 [Version 10.0.19041.1110]
TCC Build 12   Windows 10 Build 19041

C:\>which @ifilesize
@ifilesize is a plugin variable (Acquire)

C:\>echo %@pluginver[acquire]
1.0.0

C:\>echo %@ifilesize[https://jpsoft.com/downloads/v28/tcmd.exe]
64562800

C:\>

Any error message produced by my plugin ought to include the plugin name:
Code:
C:\>echo %@ifilesize[]
Acquire plugin: Missing filename

C:\>echo %@ifilesize[tcmd.exe]
Acquire plugin: Bad or missing protocol: "tcmd.exe"

C:\>
 
The only idea I've come up with so far is that WinInet changed in build 20H2. But why would they do that?
 
It's my fault, @Charles Dye.

This works;
Code:
e:\utils>echo %@acquire$ifilesize[https://jpsoft.com/downloads/v28/tcmd.exe]
64562800

Another plugin has the same function name;
Code:
e:\utils>which @ifilesize
@ifilesize is a plugin variable (4UTILS)
...which is what gave the error.

Joe
 
Aha. If I had realized that Vince had an @IFILESIZE, I would have picked a different name!
 
Yup. Mine doesn't want the "https://" part.

Code:
v:\> which @ifiletime
@ifiletime is a plugin variable (4UTILS)

v:\> echo %@ifilesize[jpsoft.com/downloads/v28/tcmd.exe]
64562800

Charles, do you have an @IFILETIME also? It's uses the same technique.

Code:
v:\> echo %@ifiletime[jpsoft.com/downloads/v28/tcmd.exe]
Wed, 04 Aug 2021 17:05:58 GMT
 
v:\> echo %@ifilesize[jpsoft.com/downloads/v28/tcmd.exe]
64562800[/code]

Charles, do you have an @IFILETIME also? It's uses the same technique.

Code:
v:\> echo %@ifiletime[jpsoft.com/downloads/v28/tcmd.exe]
Wed, 04 Aug 2021 17:05:58 GMT

No, I don't. @IFILESIZE is only there because I already had the code, so why not make it available to the user?
 
If you're using HttpQueryInfo() there's just a tiny difference ... whether you give it HTTP_QUERY_CONTENT_LENGTH or HTTP_QUERY_LAST_MODIFIED.
 
Processor Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz 2.60 GHz (2 processors)
Installed RAM 128 GB
Product ID 00330-80000-00000-AA032
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edition Windows 10 Pro
Version 21H1
Installed on ‎2021-‎01-‎16
OS build 19043.1110
Experience Windows Feature Experience Pack 120.2212.3530.0[/code]

@Joe Caverly :

How did you get this information? a plugin?
 
That comes from the Windows 10 Settings App ... on the "About" tab there are a few opportunities to COPY the displayed info.
 
@vefatica - it was available when I selected "This PC" on the desktop, RMB and select "Properties" then :

Device name DESKTOP-C293QAU
Processor Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz 3.10 GHz
Installed RAM 4.00 GB (3.72 GB usable)
Device ID DBD682F9-38D0-447C-878D-CA2DBDE6D8F5
Product ID 00325-82124-42604-AAOEM
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edition Windows 10 Home
Version 20H2
Installed on ‎5/‎31/‎2021
OS build 19042.1165
Serial number MJ0ETZ6Q
Experience Windows Feature Experience Pack 120.2212.3530.0
 
Oh yeah. I left something out. It's (Start button) Settings\System\About.

If you have a quick way to get to ControlPanel, "System" takes you directly to "About".

Also, from TCC, start ms-settings:about

Or just ms-settings:about in the Run dialog (Win+R).
 
Back
Top