Search found 212 matches

by darioit
19 Jun 2014 08:34
Forum: DOS Batch Forum
Topic: Problem with Quote character
Replies: 4
Views: 1773

Problem with Quote character

Hello, FirSt raw of my file named E:\DATA.TXT Is: <?xml version="1.0" encoding="UTF-8"?> but when I run this script to manipulate string FOR /F "delims=" %%a in (%1) do set "name=%%a" &call :procName %1 goto:eof :procName set name1=%name:~0,9% I got this e...
by darioit
11 Feb 2014 23:53
Forum: DOS Batch Forum
Topic: Create XML ad Hoc (Current Cost Code)
Replies: 2
Views: 1882

Re: Create XML ad Hoc (Current Cost Code)

May I write continuously a file C:\Meniscus\Data\data.xml, and every 2 minutes cut the file with a simple rename to finally name C:\Meniscus\Data\abcdefghi_%TIMESTAMP% ?
I don't think is blocked by Serial Port
by darioit
11 Feb 2014 16:57
Forum: DOS Batch Forum
Topic: Create XML ad Hoc (Current Cost Code)
Replies: 2
Views: 1882

Create XML ad Hoc (Current Cost Code)

Hello, my goal is to create a file with timestamp containing a raw exactly like this, maximum 20 raw for file. <MenTime>11/02/2014 23:05:20</MenTime><msg><src>CC128-0.11</src><dsb>01369</dsb><time>22:57:56</time><tmpr>19.7</tmpr><sensor>0</sensor><id>00077</id><type>1</type><ch1><watts>00485</watts>...
by darioit
10 Feb 2014 08:30
Forum: DOS Batch Forum
Topic: Parse MacFan.exe output
Replies: 9
Views: 3074

Re: Parse MacFan.exe output

I make with this simple script the base for build this graph:

http://oss.oetiker.ch/rrdtool/gallery/index.en.html
by darioit
09 Feb 2014 11:19
Forum: DOS Batch Forum
Topic: Parse MacFan.exe output
Replies: 9
Views: 3074

Re: parse output

ok understand the solution, regards


Code: Select all

@echo off
FOR /F "tokens=10*" %%A IN ('MacFan.exe ^| find "running"') DO SET rpm=%%A
echo %rpm%
echo 0
echo 0
echo 0
by darioit
09 Feb 2014 09:18
Forum: DOS Batch Forum
Topic: Parse MacFan.exe output
Replies: 9
Views: 3074

Re: parse output

Yes it's running on Mac Mini with windows 7 x86
by darioit
09 Feb 2014 06:30
Forum: DOS Batch Forum
Topic: Parse MacFan.exe output
Replies: 9
Views: 3074

Parse MacFan.exe output

Hello, I run this program: MacFan.exe and output is : Mac/SMC Fan Control for Windows (+ Temp) AKA MacFan - Controls fans in Intel Macs, monitors temperatures Copyright (C) 2009 Robert Gilliam Many thanks to: Davide Ramo Iam Liuzhong Lobotomo Software iStatPro widget This program is free software; y...
by darioit
04 Feb 2014 03:01
Forum: DOS Batch Forum
Topic: Parse list of hard drive data for temperature
Replies: 3
Views: 2038

Re: Parse list of hard drive data for temperature

Thank you foxidrive, but how can I get same result using this raw WScript.Echo "VendorSpecific: " & Join(objItem.VendorSpecific, ",") I would like to use: WScript.Echo "VendorSpecific: " & Join(objItem.VendorSpecific[115]) But doesn't work Regards
by darioit
03 Feb 2014 23:53
Forum: DOS Batch Forum
Topic: Parse list of hard drive data for temperature
Replies: 3
Views: 2038

Parse list of hard drive data for temperature

Hello I have this script for get hard disk temperature strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI") Set colItems = objWMIService.ExecQuery( "SELECT * FROM MSStorageDriver_ATAPISmartData",,48) For Each objIt...
by darioit
10 Sep 2013 06:53
Forum: DOS Batch Forum
Topic: Operation with number
Replies: 8
Views: 2905

Re: Operation with number

Sorry I don't understand IF %M%==01 ( SET /A YY=1%Y% -1 -100) SET /A M=12 ) ELSE ( set /a MM=1%m% - 1 -100) echo %m% Invalid number. Numeric constants are either decimal (17), hexadecimal (0x11), or octal (021). Missing operator. 12 My goal is on date (AAAA-MM) 2013-09 trransform in last month 2013-...
by darioit
10 Sep 2013 05:45
Forum: DOS Batch Forum
Topic: Operation with number
Replies: 8
Views: 2905

Re: Operation with number

same problem

SET /A Y=2013-1
SET /A M=12
) ELSE (SET /A M=09-1 )
Invalid number. Numeric constants are either decimal (17),
hexadecimal (0x11), or octal (021).
by darioit
10 Sep 2013 02:26
Forum: DOS Batch Forum
Topic: Operation with number
Replies: 8
Views: 2905

Operation with number

Hello, I have this problem, make sum and subtraction with variable This is my code: @echo on &setlocal for /f "delims=" %%A in ('wmic OS Get localdatetime ^| find "."') do set DATETIMEWMI=%%A set Y=%DATETIMEWMI:~0,4% set M=%DATETIMEWMI:~4,2% set G=%DATETIMEWMI:~6,2% IF %M%==0...
by darioit
21 Jun 2013 01:13
Forum: DOS Batch Forum
Topic: How check share UNC
Replies: 7
Views: 3347

Re: How check share UNC

if exist errorlevel=0 if NOT exist errorlevel=0 if NOT authorized errorlevel=0 None of those are properly formatted commands. sorry this is not a command but the result of command This is the right script: if exist "\\Server\Share\Folder" echo exists echo %errorlevel% in all case tested %...
by darioit
20 Jun 2013 06:20
Forum: DOS Batch Forum
Topic: How check share UNC
Replies: 7
Views: 3347

Re: How check share UNC

I check this script

Code: Select all

if EXIST "\\Server\Share\Folder" echo exists


if exist errorlevel=0
if NOT exist errorlevel=0
if NOT authorized errorlevel=0

That's the point !
by darioit
20 Jun 2013 02:36
Forum: DOS Batch Forum
Topic: How check share UNC
Replies: 7
Views: 3347

How check share UNC

Hello everyone,

I'm looking for a very simple script that check if UNC share as "\\server\abc" is available before copy some file into that.

I got error after copy file, but it would be useful to know before if a share is down or user has no permission to copy file.

Best Regards