CMD Batch Online

Nov 3, 2012
Hi guys! In my website i've put a .cmd batch file.
Is it possible to run that batch without to save it locally (in the hard drive)?

Thank you
Sep 11, 2012
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:


@echo off
copy %URL %TEMP%\%1 /e
iff exist %TEMP%\%1 then
call %TEMP%\%1
*del %TEMP%\%1 /q/e
echo %URL% not found or download error


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.

Nov 3, 2012
Thank you, but your runweb.cmd save my batch into the %temp% folder. Does exist a way to run a remote batch without to save it in the hard drive?
Nov 3, 2012
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:

Run("C:\mycompiledbatch.exe","/C /parameter")

Could it useful (a parameter) to encrypt my batch?
Could TCC help me?

Thank you very much
Nov 3, 2012

Tried now to encrypt my batch with BATCOMP. How can i launch the encrypted file to test it?
Nov 3, 2012
I try to explain me better:

This is "mybatch.cmd":

@echo off
echo TEST OK
>nul pause

With batcomp i do:

batcomp /E /O mybatch.cmd myencryptedbatch.cmd

Batcomp has now created the "myencryptedbatch.cmd" file. Editing it, i found something like this:


How can i run the "myencryptedbatch.cmd" batch file?
Nov 3, 2012
I've opened "tcc.exe" and after changing the batch dir i type: myencryptedbatch

tcc.exe says that is an unknown command.
Nov 3, 2012
What is the command to decrypt an encrypted batch? In the Help i can only find the batcomp to encrypt.
What is the command to decrypt an encrypted batch? In the Help i can only find the batcomp to encrypt.
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.
Nov 3, 2012
Thank you!

Now i've tried to encrypt a big size batch file (over 80kb). It contains several FOR / commands.

It seems that the new encrypted .btm is too long. It gives an error about a label that can't found.

If i cut some FOR commands it works. There are no errors in this batch, infact cmd.exe runs it fine.


Staff member
May 14, 2008
Now i've tried to encrypt a big size batch file (over 80kb). It contains several FOR / commands.

It seems that the new encrypted .btm is too long. It gives an error about a label that can't found.

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.
Similar threads
Thread starter Title Forum Replies Date
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
Joe Caverly "Functions" in cmd.exe batch files Support 6
P Labels in batch files: TCC vs CMD.exe Support 9
TT's Help! Uninstalling TCC did not restore cmd.exe as Win10 default batch file processor. Support 4
D Run all .CMD batch files with CMD.EXE Support 16
L How to synthesize cmd.exe's DEL /Q Support 2
T WAD CMD incompatibility Support 14
sully9 How to? Unexpected %DATE% CMD variable format (vs DATE /T format) in CMDebug Support 1
L FTYPE in TCC, less quirky than in cmd.exe Support 3
Peter Murschall Single-line Do-CMD is a bit uncooperative. Support 6
T Date format date different from cmd Support 7
D Differences between TCC and CMD with COPY /b Support 4
E TCC/CMD difference Support 5
S How to? Deinstalling TC/reinstating execution of bat files by cmd in Win7 Support 31
D How to? Pass OpenHere Folder to CMD? Support 6
R Difference between TCC and CMD: variable names with hyphens Support 4
M WAD "Pictures" directory is empty in TCC but not in CMD or Explorer Support 4
rps Cmd history recall Support 4
rps Documentation TITLE cmd docs Support 0
Joe Caverly PUSHD with UNC path in CMD.EXE Support 2
W Starting program for word to pdf conversion (difference cmd and tcc) Support 13
Joe Caverly Using this CMD technique from TCC Support 17
W If command - different with CMD Support 6
I how to make TCC default/replace cmd.exe? Support 9
R FOR usage error from TCC but not from CMD Support 16
I findstr works in cmd but not in tcc Support 5
D Pasting Unicode data has different behavior on TCC and CMD Support 2
M Command line parsing differences between cmd.exe and TCC Support 6
Joe Caverly Works with CMD.EXE, no output with TCC.EXE Support 7
Joe Caverly tcommand(cmd) Support 13
L WAD ECHO. expansion of non-existent env-vars differs from CMD.exe Support 6
Joe Caverly Works in debugger, not from cmd line Support 1
K CMD, TCC, VisualStudio 2017, VcVars* differences Support 1
D Does TCC improve CMD's implementation of ECHO? Support 6
Patulus Yet another thread on CMD compatibility Support 16
A Fixed (CMD compat) START /D fails to recognize the switch option. Support 3
Joe Caverly CMD.EXE and filename(1).ext Support 3
H DOS CMD Sort+Add Sequence+Remove Sequence number Support 12
T WAD Difference between TCC and CMD in handling multi-command lines Support 6
C Nested IF syntax — TCC behaving differently to CMD Support 12
T CMD incompatibility Support 14
V Network share slowness vs CMD? Support 19
P Fixed Rexx .cmd files no longer work in TCC 20 Support 3
R How to? Display text same as in CMD Support 14
E How to? use Executable Extensions: .bat and .cmd Support 8
D Tab completion differences with cmd.exe Support 3
deleyd Fixed Behavior different than CMD Support 1
vefatica START, CMD vs. TCC Support 0
R Difference in behavior of RMDIR vs. CMD.EXE? Support 5

Similar threads