2

How to make a default program for pattern of file extensions in Windows?

Specifically, I SSH into a Linux cluster to run job scripts and there is information in a file of the form

JobName.o####

where #### is a counter of the number of jobs since the system was last reset, so it can be any length.

Doing some poking around it seems like the method described in this question for extensionless files could be used. However, how do I handle the numbers at the end?

5
  • I typically just use Open With then indicate I always want the same program to be used.
    – Ramhound
    Sep 15, 2017 at 13:40
  • 1
    Not an answer per-se but can't you either (a) have the cluster change the output format of the job names to add .something on the end or (b) just run a Linux bash script to add an extension such as: for f in JobName.*; do mv "$f" "${f%.extension}"; done source: stackoverflow.com/questions/6114004/…
    – Dave C
    Sep 15, 2017 at 13:41
  • 2
    I am reasonably sure that windows just won't do this. filetype associations exist as registry entries in HKEY_CLASSES_ROOT\ and are the literal extension (.exe, .txt, etc). From there, the default key usually contains a path to the executable. So Windows performs the registery search using the extension on the file selected, and there is no means to perform wildcard searches of the registry. Sep 15, 2017 at 13:47
  • 1
    In the end, the best bet will be to alter the job to create the files as jobname.runcount,ext so that you can retain the sequence, but not deal with it as a filetype extension (because it isn't a type of file. ) Sep 15, 2017 at 13:50
  • Or use a batch job to rename the files on the Windows PC after download, if you can't have the extension changed on he server. Sep 15, 2017 at 15:22

0

You must log in to answer this question.

Browse other questions tagged .