"more" command is not executed at once in case the file is t
Moderator: DosItHelp
-
- Posts: 19
- Joined: 01 Mar 2013 11:44
"more" command is not executed at once in case the file is t
Hello,
In case I run "more" command for a certain file which is too big, the command is not executed at once but "pressing a button" is needed.
Does anybody know any trip on how to overcome this within a batch file?
Thanks
Best Regards,
Nikos
In case I run "more" command for a certain file which is too big, the command is not executed at once but "pressing a button" is needed.
Does anybody know any trip on how to overcome this within a batch file?
Thanks
Best Regards,
Nikos
Re: "more" command is not executed at once in case the file
With the more command it triggers the pause every 64K lines.
What do you need to do? If you explain the task then someone may have a workaround.
What do you need to do? If you explain the task then someone may have a workaround.
-
- Posts: 19
- Joined: 01 Mar 2013 11:44
Re: "more" command is not executed at once in case the file
Actually, what I am doing is to run more command for a JPG file which is more than 6 Kbytes. When I run it, the 41% of more command is executed and it is demanded to press a button in order to continue with the running of the command.
What I need is to use this command in a batch file but the "press button" action to be executed automatically. This means that the user does not have to press a button.
I hope it is more clear now
Thanks
Nikos
What I need is to use this command in a batch file but the "press button" action to be executed automatically. This means that the user does not have to press a button.
I hope it is more clear now
Thanks
Nikos
Re: "more" command is not executed at once in case the file
No. Not really clear at all. Using the MORE command with a JPEG or any other file that isn't a text file really doesn't make any sense at all!
-
- Posts: 19
- Joined: 01 Mar 2013 11:44
Re: "more" command is not executed at once in case the file
My code is the below one :
@echo off
cd /d "%~dp0"
for %%b in (DSF_5105_nikon.jpg) do (
more %%b > %%b.txt
)
pause
The DSF_5105_nikon.jpg has 6.6 MB size. As a result the more command cannot be executed at once and the -- More (41%) -- is displayed at the bottom of %%x.txt which means that the user must press a key on the keyboard.
What I need is this action(key press) to be done automatically which means that user does not have to press any key
Thanks
Nikos
@echo off
cd /d "%~dp0"
for %%b in (DSF_5105_nikon.jpg) do (
more %%b > %%b.txt
)
pause
The DSF_5105_nikon.jpg has 6.6 MB size. As a result the more command cannot be executed at once and the -- More (41%) -- is displayed at the bottom of %%x.txt which means that the user must press a key on the keyboard.
What I need is this action(key press) to be done automatically which means that user does not have to press any key
Thanks
Nikos
Re: "more" command is not executed at once in case the file
Why are you using more on a binary file though? What's the purpose of running a JPG file through more?
-
- Posts: 19
- Joined: 01 Mar 2013 11:44
Re: "more" command is not executed at once in case the file
I want to extract some info about the photo like the date/time taken and the brand/model of the camera...
Re: "more" command is not executed at once in case the file
Why do you think passing the .jpg file through MORE will help you extract that information
I don't see how that could help, even if you could avoid the pause at 64k lines.
I don't see how that could help, even if you could avoid the pause at 64k lines.
Re: "more" command is not executed at once in case the file
autonicknan wrote:I want to extract some info about the photo like the date/time taken and the brand/model of the camera...
Use an EXIF command line tool to give you the information.
Re: "more" command is not executed at once in case the file
autonicknan wrote:I want to extract some info about the photo like the date/time taken and the brand/model of the camera...
Then use an EXIF extraction program!
Re: "more" command is not executed at once in case the file
forget about more.
If (IF because mspaint does not set any metadata for instance , some other tools do , but it's not mandatory ) there is some metadata in the jpg files you try to extract it with strings ->http://technet.microsoft.com/en-us/sysinternals/bb897439.aspx
the ultimate tool for processing images trough command line is imagemagick - http://www.imagemagick.org/
If (IF because mspaint does not set any metadata for instance , some other tools do , but it's not mandatory ) there is some metadata in the jpg files you try to extract it with strings ->http://technet.microsoft.com/en-us/sysinternals/bb897439.aspx
the ultimate tool for processing images trough command line is imagemagick - http://www.imagemagick.org/
Re: "more" command is not executed at once in case the file
Some nice vbscripts over here.
I am sure they could be converted to dump the output to a text file instead of the screen or even parse the output with the FOR /F command.
http://www.jsware.net/jsware/scrfiles.php5#jpginf
I am sure they could be converted to dump the output to a text file instead of the screen or even parse the output with the FOR /F command.
http://www.jsware.net/jsware/scrfiles.php5#jpginf
Re: "more" command is not executed at once in case the file
exiftool looks to be really nice. You can specify which tags you want to extract.
http://www.sno.phy.queensu.ca/~phil/exiftool/
http://www.sno.phy.queensu.ca/~phil/exiftool/