Search found 3981 matches

by Squashman
21 Jan 2020 09:41
Forum: DOS Batch Forum
Topic: right click command line help
Replies: 4
Views: 56

Re: right click command line help

So you are using the SENDTO option of the context menu?

The syntax for the command is
ViewCompanion /c format inputfile outputfile

So ShadowThief gave you the correct syntax for using the command modifiers.

ViewCompanion /c pdf "%~1" "%~dpn1.pdf"
by Squashman
14 Jan 2020 15:44
Forum: DOS Batch Forum
Topic: Sync from a list file with
Replies: 4
Views: 120

Re: Sync from a list file with

The DIR /B /S command would include a full path in the output. In the script you are appending that information to the source folder. Xcopy would fail because the input path is invalid.
by Squashman
30 Dec 2019 08:31
Forum: DOS Batch Forum
Topic: measrue elapsed time
Replies: 4
Views: 542

Re: measrue elapsed time

Userdosfx wrote:
28 Dec 2019 08:00
I need something like stopwatch examples
Not those examples
Explain to us how using GetTimeStamp or JTimeStamp does not working for you in a stopwatch like fashion.
by Squashman
18 Dec 2019 10:24
Forum: DOS Batch Forum
Topic: Enable and Start Service on entire subnet remotely
Replies: 2
Views: 459

Re: Enable and Start Service on entire subnet remotely

Sounds to me like you just need a FOR /L loop and you are done for /l %%i in (1 1 254) do ( sc \\192.168.100.%%i config remoteregistry start= auto sc \\192.168.100.%%i start remoteregistry ) Steffen Essentially what I told them to do on SO . Fairly easy to understand how to use a FOR /L if you read...
by Squashman
05 Nov 2019 18:19
Forum: DOS Batch Forum
Topic: [SOLVED] Delete row in >> %OUTPUT%.
Replies: 8
Views: 1316

Re: Delete row in >> %OUTPUT%.

Good evening, I have a batch script that outputs to a file, for example . . . echo Title: %var1% >> %OUTPUT% echo Title: %var2% >> %OUTPUT% echo Title: %var3% >> %OUTPUT% It can leave several blank lines in between even though there are none in the code. Now I am pretty sure the answer is going to ...
by Squashman
03 Nov 2019 19:47
Forum: DOS Batch Forum
Topic: Foxidrive has left us
Replies: 29
Views: 11438

Re: Foxidrive has left us

Squashman wrote:
02 Nov 2018 14:14
Squashman wrote:
02 Nov 2017 08:50
Well it is technically November 3rd in Australia......

Still have not forgotten about you! Hope you are in a good place living out eternity and partying like its 1999.
Well this year it is already a day late. Still remembering you.
by Squashman
09 Oct 2019 21:33
Forum: DOS Batch Forum
Topic: Remove Microsoft header from cmd, for example when executing code from alternate data stream
Replies: 10
Views: 7245

Re: Remove Microsoft header from cmd, for example when executing code from alternate data stream

What is your end game for using ADS? Just want to make you aware that the ADS is only local to the system you are using it on. If you try to upload or email a file with an ADS, only the main data stream is transferred.
by Squashman
27 Sep 2019 12:02
Forum: DOS Batch Forum
Topic: how to check file exists or not : batch script
Replies: 2
Views: 4799

Re: how to check file exists or not : batch script

The help file gives some pretty clear information on how to do that. C:\>if /? Performs conditional processing in batch programs. IF [NOT] ERRORLEVEL number command IF [NOT] string1==string2 command IF [NOT] EXIST filename command NOT Specifies that Windows should carry out the command only if the c...
by Squashman
27 Sep 2019 10:00
Forum: DOS Batch Forum
Topic: non-buffering FOR /F alternative
Replies: 7
Views: 6832

Re: non-buffering FOR /F alternative

So is reading the file similar to what you were doing here?

Essentially tailing a file?

Code: Select all

@echo off
call :Loop <"tailme.txt"

exit

:Loop
set "line="
set /p "line="
if defined line (
  echo %line%
) else (
  pathping -q 1 -p 300 localhost >nul
)
goto :loop
by Squashman
03 May 2019 08:22
Forum: DOS Batch Forum
Topic: Dir with wildcard returning unexpected result
Replies: 4
Views: 1819

Re: Dir with wildcard returning unexpected result

I'm not using the short name format. I tried with the /X and i still get filenames I dont want Never said you were using short file names nor did I say using /X would solve your problem. I am saying the default behavior is that the WILDCARD will also match short file names. The EXAMPLE your provide...
by Squashman
02 May 2019 15:49
Forum: DOS Batch Forum
Topic: Dir with wildcard returning unexpected result
Replies: 4
Views: 1819

Re: Dir with wildcard returning unexpected result

It is matching the short file names. 8.3.
Run the DIR command from a command prompt and use the /X option to see what I mean.
by Squashman
01 May 2019 08:46
Forum: DOS Batch Forum
Topic: Get Parent Directory as a variable
Replies: 6
Views: 2320

Re: Get Parent Directory as a variable

The help files for the CALL and FOR commands explain the modifiers you can use to get a files parent directory. CALL In addition, expansion of batch script argument references (%0, %1, etc.) have been changed as follows: %* in a batch script refers to all the arguments (e.g. %1 %2 %3 %4 %5 ...) Subs...
by Squashman
27 Apr 2019 20:56
Forum: DOS Batch Forum
Topic: gzip batch
Replies: 30
Views: 7582

Re: gzip batch

C:\>C:\BatchFiles\GZIP>gz.bat index.html Le client ne dispose pas d’un privilège nécessaire. C:\>C:\BatchFiles\GZIP>gz.bat file.css Le client ne dispose pas d’un privilège nécessaire. C:\>C:\BatchFiles\GZIP>gz.bat foobar.js Le client ne dispose pas d’un privilège nécessaire. All three of those comm...