Need to output the contents of a specific file
Moderator: DosItHelp
Need to output the contents of a specific file
Hi,
Need to output the contents of a specific file
Need to output the contents of a specific file
Last edited by ladduq on 16 May 2012 04:08, edited 1 time in total.
Re: Need to output the contents of a specific file
We'd need to see a sample of the file, and also be told what format you want the output to look like.
Re: Need to output the contents of a specific file
Hi
we cant see the file contents
we cant see the file contents
Last edited by ladduq on 16 May 2012 04:09, edited 1 time in total.
Re: Need to output the contents of a specific file
Hi,
Why don't you try to open the file with notepad or notepad ++ (if the file big)
if you can read the content and it's not strange symbols let us know and there will be
a possiblity but if it contain symbols then i guess there is no chance without using the original program
Why don't you try to open the file with notepad or notepad ++ (if the file big)
if you can read the content and it's not strange symbols let us know and there will be
a possiblity but if it contain symbols then i guess there is no chance without using the original program
Re: Need to output the contents of a specific file
In case that the file can be read from the notepad
try this:
This will copy the content to clipboard then make a file and copy the content to it.
Don't forget to change the setting part in the batch file.
:by the way if the notepad can open it and you can read it just change .fpr to .txt
and check this too http://www.dostips.com/forum/viewtopic.php?f=3&t=3030
try this:
Code: Select all
@echo off
cls
::===> Settings
set file1=%userprofile%\desktop\source.fpr
set file2=%userprofile%\desktop\output.txt
::===> Code
clip < "%file1%"
>"%temp%\clipboard.vbs" (
echo.Set objHTML = CreateObject("htmlfile"^)
echo.ClipboardText = objHTML.ParentWindow.ClipboardData.GetData("text"^)
echo.path = "%file2%"
echo.Set objFSO = CreateObject("Scripting.FileSystemObject"^)
echo.Set objFile = objFSO.OpenTextFile(path, 2, true^)
echo.objFile.WriteLine ClipboardText
echo.objFile.Close )>>"%temp%\clipboard.vbs"
"%temp%\clipboard.vbs"
ping localhost -n 2 >nul
del /F /Q %temp%\clipboard.vbs
This will copy the content to clipboard then make a file and copy the content to it.
Don't forget to change the setting part in the batch file.
:by the way if the notepad can open it and you can read it just change .fpr to .txt
and check this too http://www.dostips.com/forum/viewtopic.php?f=3&t=3030
Re: Need to output the contents of a specific file
@abc0502
Hi
Thank you for replying.
It is not working.
Regards
Ladduq
Hi
Thank you for replying.
It is not working.
Regards
Ladduq
Re: Need to output the contents of a specific file
'
Maybe I can help but only if
Maybe I can help but only if
Which OS you have, cause this code isn't universal.foxidrive wrote:We'd need to see a sample of the file, and also be told what format you want the output to look like.
On top of that, it's simply wrong.abc0502 wrote:Code: Select all
clip < "%file1%"
Re: Need to output the contents of a specific file
Ed Dyreen wrote:'
Maybe I can help but only ifWhich OS you have, cause this code isn't universal.foxidrive wrote:We'd need to see a sample of the file, and also be told what format you want the output to look like.On top of that, it's simply wrong.abc0502 wrote:Code: Select all
clip < "%file1%"
he came her for a batch file so the os must be windows and the out put is text
see the end of the code
sourceanalyzer -scan -b buildid -f reports.txt
and i have a question why
Code: Select all
clip < "%file1%"
is wrong i tested the batch on text file and exe file it will out put the content if it is just readable text so if his content isn't readable like exe files he will need the program that generate the fpr file to read it
Re: Need to output the contents of a specific file
'
My bad, I meant which version of windows you use
The clip command
I guess you meant
without the additional
But it may still work, not on my XP though, that's why I ask which OS he use.
But maybe I'm just old-school
My bad, I meant which version of windows you use

The clip command
Code: Select all
Microsoft Windows XP [versie 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\PROFSYS\ADMIN>clip
clip wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
C:\PROFSYS\ADMIN>echo.%errorlevel%
9009
Code: Select all
>"%temp%\clipboard.vbs" (
echo.Set objHTML = CreateObject("htmlfile"^)
echo.ClipboardText = objHTML.ParentWindow.ClipboardData.GetData("text"^)
echo.path = "%file2%"
echo.Set objFSO = CreateObject("Scripting.FileSystemObject"^)
echo.Set objFile = objFSO.OpenTextFile(path, 2, true^)
echo.objFile.WriteLine ClipboardText
echo.objFile.Close
)
"%temp%\clipboard.vbs"
Code: Select all
>>"%temp%\clipboard.vbs"
But maybe I'm just old-school

Re: Need to output the contents of a specific file
Ed Dyreen wrote:dCode: Select all
Microsoft Windows XP [versie 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\PROFSYS\ADMIN>clip
clip wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
He's using that new fandangled Windows, maybe.
Code: Select all
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\dos>clip /?
CLIP
Description:
Redirects output of command line tools to the Windows clipboard.
This text output can then be pasted into other programs.
Parameter List:
/? Displays this help message.
Examples:
DIR | CLIP Places a copy of the current directory
listing into the Windows clipboard.
CLIP < README.TXT Places a copy of the text from readme.txt
on to the Windows clipboard.
Why didn't MS make the tool able to read the clipboard as well?? Maybe that will be the enhancement in Windows 9.
Re: Need to output the contents of a specific file
Hi, Ed Dyreen I use windows 7 , i didn't use clip before and the first time was on 7 so i thought it was on xp too
and now i understand why u said "this code isn't universal"
and now i understand why u said "this code isn't universal"

Re: Need to output the contents of a specific file
hi ladduq u said that the command:
doesn't work for the big file, see page 59 & 60 in the guide it talking about "Java Heap Exhaustion" i don't know what is it exactly but the problem is about heap space the default is 600 mb so basicly u will need to give more space then out put the reports.txt and then post the file so we can help in getting the lines u need.
Code: Select all
sourceanalyzer -scan -b buildid -f reports.txt
doesn't work for the big file, see page 59 & 60 in the guide it talking about "Java Heap Exhaustion" i don't know what is it exactly but the problem is about heap space the default is 600 mb so basicly u will need to give more space then out put the reports.txt and then post the file so we can help in getting the lines u need.
Re: Need to output the contents of a specific file
Hi
I use windows xp operating system
Regards
Ladduq
I use windows xp operating system
Regards
Ladduq
Last edited by ladduq on 16 May 2012 04:12, edited 1 time in total.
Re: Need to output the contents of a specific file
Hi .. again
the symbols are in the results.fpr ... right!
you can select the output formate using "-format <format>" option
the allowed formats is fpr,fvd1,text and auto
so the output can be a text format and you can't read it if you did't put the option "format"
the "auto" is set as default and the output will be fpr type even if you write "-f results.txt"
i guess the code must be:
or
(i'm not sure txt or text)
in guide page no#35 "output options"
then if you want to search for a text in that file it will be easy using batch but if still symbols i guess there is no chance.
good luck
the symbols are in the results.fpr ... right!
you can select the output formate using "-format <format>" option
the allowed formats is fpr,fvd1,text and auto
so the output can be a text format and you can't read it if you did't put the option "format"
the "auto" is set as default and the output will be fpr type even if you write "-f results.txt"
i guess the code must be:
Code: Select all
sourceanalyzer -scan -b buildid -format text -f reports.txt
or
Code: Select all
sourceanalyzer -scan -b buildid -format txt -f reports.txt
(i'm not sure txt or text)
in guide page no#35 "output options"
then if you want to search for a text in that file it will be easy using batch but if still symbols i guess there is no chance.
good luck

Re: Need to output the contents of a specific file
@abc0502
Hi
Thank You all for all the help

Hi
Thank You all for all the help
