If the CALL supported similar feature as COPY then you could avoid any explicit save.
But a small batch file (or alias) like this would do the trick:
runweb.cmd
@echo off
setlocal
set URL=user:[email protected]/folder/%1
copy %URL %TEMP%\%1 /e
iff exist %TEMP%\%1 then
call %TEMP%\%1
*del %TEMP%\%1 /q/e
else
echo %URL% not found or download error
endiff
endlocal
If you then had a batch file called mycoolbatchfile.cmd then you would use the following command to run it:
runweb.cmd mycoolbatchfile.cmd
I did a quick test of this, and it worked OK for me.
What do you suggest me to protect my batch file? I've bought a professional software to compile bat and cmd but it decompiles the source to the %temp% folder.
The ideas were to run the batch on the web or encrypt the batch and run it locally, so yesterday i've installed TCC but i don't know if it can encrypt my batch or help me in some way. I've created a GUI (with an authoring software) called "loader.exe" to launch my batch file. I can modify "loader.exe" to can pass any parameters to my batch, for example:
The page "Batch File Compression" says, "JP Software does not provide a utility to decompress batch files. If you use BATCOMP, make sure that you also keep a copy of the original batch file for future inspection or modification."
Compressing a .cmd file doesn't work for me either. It works for .btm.
I don't think it's cryptographically secure, but it's certainly a lot more obscure than a CMD.EXE batch file -- which must be in plain text for CMD.EXE to process it.
BATCOMP is a somewhat obsolete and elderly (originally in 4DOS) command; batch files are limited to a maximum size of 64K before compression. If you need to use BATCOMP, you'll have to break up your batch file into multiple < 64K files.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.