Automate a manual process of opening / saving as files - windows

I have a tool which opens .HED files which are some kind of documents created a long time ago..
This type of files is so old and tools opening this extensions are rare. fortunately, I have a tool which opens them. when opened this program gives the choice to open files and saving them as other extensions (.rtf for example )
The problem is: there are about 400 files to be converted from .rtf to .hed and we went to automate this process of opening .rtf file saving it as .hed by some command line.
Is there a way to do so in Windows?
I'm able to open the program by "open 'program_name'" but I'm wondering if it's possible to open all files in folder and saving them as .hed after
Thank you

Related

Adding customized colors to POTX file

I know there already is an answer to the question here:
How to add new(customized) Theme colors to Powerpoint using VBA
But it didn't work. And as I'm not allowed to comment there (not enough reputation) I'm sorry for opening up a new question. (Dear admins - this isn't really clever in my opinion. Now we have two threads on the same thing, just because I'm not allowed to comment.)
Back to topic:
http://echosvoice.com/wp-content/uploads/pptfiles/customcolors.pdf
I followed the instructions of Echo, recommended in the other thread, but it didn't work. I have ppt2010 and tried with a THMX, a POTX and a PPTX. It's always the same. I rename the file by adding a .zip - I extract the ZIP - I copy Echo's example code and paste it right before /a:theme in theme1.xml file - I save it - I zip the whole folder - I delete the ZIP Extension - and it's corrupt. When I doubleclick, PPT opens without a slide. When I got to "open" and choose the template, I get an error message. "Repair" doesn't help. - What am I doing wrong?
(Somewhere else I read, I have to add this to every theme-file, but it doesn't make a difference)
Be kind to yourself. Use 7-zip (free) to open the PPTX (it can open them directly w/o having to rename them, and won't corrupt the files).
Alternatively, rename the file to zip, doubleclick to open the zip in Windows Explorer, drag any file you need to edit to the desktop, edit it there, drag it back into the still-open zip, then close the zip.

Proper SpreadsheetML file extension

I want to create a a SpreadsheetML file on local drive which can be opened in MS Excel or Open Office by clicking on file in Windows Explorer.
I tried all filename extensions registered to Microsoft Excel i could find so far.
Some of them (.xls for example) allows file to be opened, but after "File is in different format than specified by the file extension" warning dialog. Some extensions (like .xlsx) causes Excel to show format error dialog without opening file.
Wikipedia tells that extension should be .xml, but it is registered to be opened by web browser by default.
This, this and this similar questions are about downloading a file from web and setting proper content-type. But i can not change content-type for local file.
This article explains how this annoying Extension Hardening mechanism works and how to disable it, but i think it is wrong to force user to disable security features just to allow spreadsheet file to be opened.
So there is no solution or am i missing something?
Now Open Office can open .xlsx (and read) files and Excel can open (and read) .ods files. My suggestion is to pick one of them that best suits your audience and your understanding of the specific file format.
Both of the applications have advantages and disadvanges and non-supported features between the two of them.
I suggest reviewing the document Differences between the OpenDocument Spreadsheet (.ods) format and the Excel (.xlsx) format.
When you work with two file formats, like .xlsx and .ods, there might
be formatting differences, and not all features will be available.
You’ll be able to convert data and content, but the way you work with
the content might be different depending on which formats you use.
One gotcha is with Open Office when you save a .xlsx file it will change the format to a .ods file. Both the applications will re-arrange the folder structure after saving anyway.
The biggest change is how you go about creating the SpreadsheetML files, both Open Office and Excel have a different folder structure depending on the file extension you will use.
Here is a short example of an Excel folder format.
-/
- _rels/
- .rels
- xl/
- _rels/
- workbook.xml.rels
- sheet1.xml
- workbook.xml
- [Content_Types].xml
I have created a sample GitHub repository for this with a sample that will open in both Excel and Open Office.
https://github.com/Nico-StackOverflow/proper-spreadsheetml-file-extension

How to update a PDF document opened in a viewer on Windows

I am writing a cross-platform application which generates PDF documents and then opens them with the standard PDF viewer. On Linux, updating (re-writing) an already opened document is no problem. The PDF viewer (have tried several) updates the displayed document after overwriting the file. I don't even have to trigger anything. This comes in very handy.
On Windows, however, I cannot overwrite a PDF document opened for reading by some viewer, because the viewers seem to open the document exclusively. Of course I cannot change the code of the viewers like Adobe Reader.
Is there any solution to this? I don't want to clutter the directory with arbitrary new file names, but rather use the same file name again. Deleting of the opened file is also forbidden on Windows.
I cannot determine which PDF viewer is used. In order to open the document, I use
cmd.exe /c start <fileName>

Open an already opened (by others) Excel file with BATCH

I have a BATCH code, which perfectly opens an EXCEL file:
START "C:\office\excel.exe" "C:\tmp\file.xlsx"
BUT: If someone else opens this EXCEL file (via network) and do not close it --> he leaves it opened, then I cannot open this file using my BATCH.
If I click on the EXCEL file, and press ENTER (so opening using windows not batch), the file will be opened, but it alerts me that someone else is locked this file, but I can open it to read or I can request a notice if the other person closes the file.
How could I set in BATCH file, to open the EXCEL (or WORD) file (only for reading) even if it is opened by others (via network)?
The solution is: leave the START command:
"C:\office\excel.exe" "C:\tmp\file.xlsx"

How can I determine whether a specific file opens in windows and then closed

I am working on windows 7 64 bit machine.
How can I get list of files opened. Also, the list should change when a particular file is closed.
How to get a file close event:
when file is opened in a new process of file opener (like notepad,
wordpad which opens file everytime in new process of wordpad)
when file is opened in a tab of file opener (like notepad++, which opens all files in new tab but there exist only a single process of notepad++ running).
I tried with Process Explorer, Handle, Unlocker, openfiles, not able to catch the file close event on notepad++.
Use SysInternals' ProcessMonitor.
It records all file and registry opens/reads/writes/closes. You can filter it to include or exclude specific patterns, file paths, programs, etc.
Edit
Process Monitor showing CloseFile when I close a tab in NotePad++:

Resources