Forum LiberKey


https://www.liberkey.com/forum/

Open text file with certain application depending on size

https://www.liberkey.com/forum/viewtopic.php?f=30&t=3876

Page 1 sur 1

Open text file with certain application depending on size

MessagePosté: 23 Juin 2010, 16:54
de MicketsBR
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

Re: Open text file with certain application depending on siz

MessagePosté: 28 Juin 2010, 10:03
de Dji
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

Re: Open text file with certain application depending on siz

MessagePosté: 18 Novembre 2010, 14:10
de MicketsBR
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.