Search found 1567 matches

by Ed Dyreen
20 Feb 2019 05:01
Forum: DOS Batch Forum
Topic: running any external command safely !
Replies: 10
Views: 1688

Re: running any external command safely !

Running an external command in a cmd /K initiated environment the "usual" way is insecure. Testing platform XP. Path contains brackets AND spaces: set "externalCommand=..\doskitXPserver2003 v0.1 (20190129)\Hello world ^^^!\doskitXPserver2003 v0.1 (20190129)\ext\eval\eval.EXE" set "externalCommand" e...
by Ed Dyreen
16 Feb 2019 10:19
Forum: DOS Batch Forum
Topic: Save/Load null variables
Replies: 3
Views: 677

Re: Save/Load null variables

some variables are null
NULL does exist as character but is used internally by cmd for delimiting variables in memory and cannot be assigned or it is used in the context of device during a redirection.
by Ed Dyreen
14 Feb 2019 19:30
Forum: DOS Batch Forum
Topic: Bat file to check a folder for TXT files with the associated PDF file
Replies: 5
Views: 814

Re: Bat file to check a folder for TXT files with the associated PDF file

Can someone please guide me on how to create a new post? I have a question that is completely irrelevant to this post. The same way you created this one ?!? If you mean the fact your post is initially invisible to the general public, that is due to the forum's anti-spam settings, new users need to ...
by Ed Dyreen
14 Feb 2019 18:02
Forum: DOS Batch Forum
Topic: Batch file to backup the documents folder on a continuing basis deleting old files while replacing with udated ones
Replies: 3
Views: 652

Re: Batch file to backup the documents folder on a continuing basis deleting old files while replacing with udated ones

Hello, I want to bring to your attention that I use a freeware program called richCopy 4.0 that can do exactly what you want. Copy/move/purge... The cool thing is it has a GUI but also can be scripted using batch. You simply start the program read the help configure it and save the displayed line in...
by Ed Dyreen
12 Feb 2019 17:27
Forum: DOS Batch Forum
Topic: How do I rerun AUTOEXEC?
Replies: 2
Views: 514

Re: How do I rerun AUTOEXEC?

I made some changes to my AUTOEXEC bat using the SET command because I don't need them to be permanent. The SET commands will do things like reset the HOMEDRIVE temporarily. Some of the SET commands worked but a set command that sets a new PATH did not. The application that needs the information in...
by Ed Dyreen
10 Feb 2019 18:15
Forum: DOS Batch Forum
Topic: Download and unzip file Batch
Replies: 34
Views: 3805

Re: Download and unzip file Batch

i have windows 7 sp1... i want to install it on C:\windows\system32 You want to install a non critical program to a directory that is specifically not designed for that purpose ? The windows folder contains system related files, from dynamic link libraries to topology that allows for system restore...
by Ed Dyreen
10 Feb 2019 17:18
Forum: DOS Batch Forum
Topic: running any external command safely !
Replies: 10
Views: 1688

Re: what the ? start "" /B ""(tst).cmd""

Just because i am curious - why do you use doubled double-quotes; shouldn't the command work with doublequotes using only one time? start "" /B "(t s t).cmd" penpen It is the '(' and ')' characters that confuses cmd if running with the /K option on my windows XP apparently, but I suspect on your wi...
by Ed Dyreen
09 Feb 2019 10:45
Forum: DOS Batch Forum
Topic: Download and unzip file Batch
Replies: 34
Views: 3805

Re: Download and unzip file Batch

switchy wrote:
09 Feb 2019 10:38
can you please get an example of wget download?
Many. I have never actually used wget myself though.
by Ed Dyreen
09 Feb 2019 10:15
Forum: DOS Batch Forum
Topic: running any external command safely !
Replies: 10
Views: 1688

Re: what the ? start "" /B ""(tst).cmd""

Interesting. The command line that appears in the task manager is the same for start "" /b cmd /K ""(tst).bat"" and for start "" /b ""(tst).bat"" One can detect the /K option in the cmdCmdLine and use this knowledge to decide on consecutive /K's and program exit [/B]? %errorlevel% but it is a lot o...
by Ed Dyreen
09 Feb 2019 07:08
Forum: DOS Batch Forum
Topic: Download and unzip file Batch
Replies: 34
Views: 3805

Re: Download and unzip file Batch

switchy wrote:
09 Feb 2019 06:26
Hello, can you please tell me how to download and unzip .zip file, I need to install PHP with batch is there possible?
Many use wget to download the file and a command line version of 7zip to extract the files.
by Ed Dyreen
08 Feb 2019 17:19
Forum: DOS Batch Forum
Topic: running any external command safely !
Replies: 10
Views: 1688

Re: what the ? start "" /B ""(tst).cmd""

apparently I already solved it once elsewhere in my code. It is not /S that is required but /K.

Code: Select all

start "!$title!" !$sargs! /D "!oFile.fullPath!" "!comspec!" /K ""!oFile.file!" !$args!"
and it works :)
by Ed Dyreen
08 Feb 2019 16:23
Forum: DOS Batch Forum
Topic: running any external command safely !
Replies: 10
Views: 1688

Re: what the ? start "" /B ""(tst).cmd""

Your batch file was executed using "%comspec%" /k. If you explicitely pass option /s it should work. start "" /b cmd /s /k ""(t s t).bat"" respectively without the spaces. Steffen indeed, cmd /K seems to force the use of start cmd /S /K later. So in order to have start behave as expected it is prob...
by Ed Dyreen
08 Feb 2019 12:57
Forum: DOS Batch Forum
Topic: running any external command safely !
Replies: 10
Views: 1688

running any external command safely !

This works. > start "" /B ""(tst).cmd"" Adding spaces... > start "" /B ""(t s t).cmd"" > MessageBox( Windows cannot find file (t. ) :| > start "" /B "(tst).cmd" > .cmd niet verwacht op dit moment. Works fine from explorer... Push works too... > pushd "W:\ED\VIP\PROJ\DEV\doskit\doskitXPserver2003 v0....
by Ed Dyreen
07 Feb 2019 20:35
Forum: DOS Batch Forum
Topic: Short WAV files-is there no standard player to call from batch?
Replies: 28
Views: 9090

Re: Short WAV files-is there no standard player to call from batch?

ok let's be punctual, If the wav is pcm encoded, then it is a proper input format for standard audio CD and burning .CDA tracks. No CPU is involved when an analog audio cable is connected to the cd-drive playing the CD in analog mode. (Somehow i am tempted to search my Final DOOM CD in one of my pac...
by Ed Dyreen
07 Feb 2019 18:10
Forum: DOS Batch Forum
Topic: could anybody help with dos commands for this task
Replies: 16
Views: 2131

Re: could anybody help with dos commands for this task

If you are trying to automate a telnet connection I would advise you to use Albert Yale's Telnet scripting tool. http://support.moonpoint.com/downloads/windows/network/Telnet/tst10.php With it, you can do something like this @echo off &start /LOW "Telnet Scripting Tool v1.0" "tst10.exe" /r:manuScri...