Open text file with certain application depending on size

Discussions (excluding Support)
3 messages • Page 1 sur 1

Open text file with certain application depending on size

Messagede MicketsBR » 23 Juin 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
 
Messages: 105
Inscription: 24 Novembre 2009, 15:45

Re: Open text file with certain application depending on siz

Messagede Dji » 28 Juin 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
Avatar de l’utilisateur
Dji
Administrator
Administrator
 
Messages: 3724
Inscription: 28 Novembre 2007, 09:57
Localisation: Quelque part entre les ombres

Re: Open text file with certain application depending on siz

Messagede MicketsBR » 18 Novembre 2010, 14:10

Dji a écrit: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
 
Messages: 105
Inscription: 24 Novembre 2009, 15:45


3 messages • Page 1 sur 1

Retourner vers General discussions

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 666 invités