Open text file with certain application depending on size

Discussions (excluding Support)
3 posts • Page 1 of 1

Open text file with certain application depending on size

Postby MicketsBR » 23 June 2010, 16:54

Hello,

I use PSPad for editing large files (BAT, HTML, TXT, etc.), specially those that have lots of lines. But for smaller files, even BAT or HTML, I don't really want to wait for PSPad to load and would rather open them with a smaller application that loads faster.

Is there a way to have LiberKey open the file with a different application depending on the file size?

Thanks,

Mickets
MicketsBR
Expert Boarder
Expert Boarder
 
Posts: 105
Joined: 24 November 2009, 15:45

Re: Open text file with certain application depending on siz

Postby Dji » 28 June 2010, 10:03

You would be able to do it using batch commands or VB scripts.

Apparently, this is really easy to to it using batch commands by using the "~z" parameter modifier:
http://www.microsoft.com/resources/docu ... x?mfr=true

But... unfortunately I was not able to validate it under windows XP, I got an error "[blahblah] unexpected" :S

Another quite easy way by using VB scripts which will run one or the other text editor depending on its size :
http://www.devguru.com/technologies/vbs ... /file.html
"Si boire des coups, aller au concert ou au match, ça devient un combat
Alors tremblez, terroristes !
Parce qu'on est surentraînés !"
@glecalot
User avatar
Dji
Administrator
Administrator
 
Posts: 3724
Joined: 28 November 2007, 09:57
Location: Quelque part entre les ombres

Re: Open text file with certain application depending on siz

Postby MicketsBR » 18 November 2010, 14:10

Dji wrote:You would be able to do it using batch commands or VB scripts.

Apparently, this is really easy to to it using batch commands by using the "~z" parameter modifier:
http://www.microsoft.com/resources/docu ... x?mfr=true

But... unfortunately I was not able to validate it under windows XP, I got an error "[blahblah] unexpected" :S

Another quite easy way by using VB scripts which will run one or the other text editor depending on its size :
http://www.devguru.com/technologies/vbs ... /file.html

I did it exactly like that, and it works fine.

I don't have the batch file with me, but I can post it here later on if you're interested.
MicketsBR
Expert Boarder
Expert Boarder
 
Posts: 105
Joined: 24 November 2009, 15:45


3 posts • Page 1 of 1

Return to General discussions

Who is online

Users browsing this forum: No registered users and 477 guests

cron