Search found 516 matches

by npocmaka_
19 Jul 2013 05:30
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 19157

Re: Possible to convert M$ Word Doc into .TXT?

foxidrive wrote:That's an interesting use of doskey. :)

Subst.exe (and a bunch of exes in system32 that I don't know what in fact are doing) also can be used but I prefer doskey because I know that will do anything in a batch file and is fast enough.
by npocmaka_
19 Jul 2013 05:21
Forum: DOS Batch Forum
Topic: Key Press through Batch File
Replies: 2
Views: 10551

Re: Key Press through Batch File

You can use wscript sendkeys function.and AppActivate to send the keys to an application: m here's a sendkeys.bat: @if (@X)==(@Y) @end /* Harmless hybrid line that begins a JScript comment @echo off cscript //E:JScript //nologo "%~f0" %* exit /b 0 ***jscript part****/ var WshShell = WScrip...
by npocmaka_
19 Jul 2013 01:19
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 19157

Re: Possible to convert M$ Word Doc into .TXT?

This is a hybrid bat/vbscript and need to be saved as .bat: '>nul 2>&1|| @copy /Y %windir%\System32\doskey.exe %windir%\System32\'.exe >nul '&&@echo off && cls &&goto :end_vbs Set WordApp = CreateObject("Word.Application") WordApp.Visible = FALSE 'Open doc for r...
by npocmaka_
18 Jul 2013 14:50
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 19157

Re: Possible to convert M$ Word Doc into .TXT?

Yes , you can .But you'll have to use jscript, vbscript or powershell. Here's how you can open document->

http://msdn.microsoft.com/en-us/library ... =office.11).aspx

here are save constants
http://msdn.microsoft.com/en-us/library ... 39952.aspx


If have a time I 'll create a script tomorrow
by npocmaka_
06 Jul 2013 00:49
Forum: DOS Batch Forum
Topic: %~z1 question
Replies: 6
Views: 11135

Re: %~z1 question

There's one small issue with Endoro's code - if the file does not exists it will print that the file is empty : try this: setlocal enabledelayedexpansion set "empty=" if !empty! EQU 0 echo this will be printed endlocal I'd a similar problem here : http://ss64.org/viewtopic.php?id=1709 .And...
by npocmaka_
05 Jul 2013 02:29
Forum: DOS Batch Forum
Topic: Need to check file size through batch script.
Replies: 1
Views: 6699

Re: Need to check file size through batch script.

Code: Select all

@echo off
if exist "filename" (
  for %%F in ("filename") do set "file_size=%%~zF"
)

if defined file_size if %file_size%0 NEQ 00  (
  do something
) else (
  do something else
)