Solved

Copy TXT files as XML and HSK and SKC as MOL

Posted on 2004-08-15
5
513 Views
Last Modified: 2008-03-17
I have two files that I need to triplicate and duplicate as XML and HSK, and MOL, respectively. How do I achieve these.
TXT copied as XML and HSK
SKC copied as MOL

Any help would be appreciated.

Thanks,

John
0
Comment
Question by:johndacs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:johndoesit
ID: 11808257
To convert an SKC (IsisDraw) file to MOL, the simplest way is probably to use ChemSketch (freeware), found at  http://www.acdlabs.com/download/
You can then File¦Import the SKC file, and File¦Export it as a MOL file.

As for the first part of your question, I guess it depends what kind of information the target file should contain and what software your reading it with. Simply changing the extension from TXT to XML might work (not sure for HSK as I don't know this format).

Liam
0
 

Author Comment

by:johndacs
ID: 11816237
Liam,

I only need simple renaming of the file. I manually rename each txt file as hsk and xml (without having to worry about the format) and each skc as mol. I need a macro that replicates copy *.txt *.xml and copy *.txt *.hsk and copy *.skc *.mol in the command line. The problem associated with this that it returns short filenames and does not recognize long filenames. Can you help me with this?

Regards,

John
0
 
LVL 1

Expert Comment

by:johndoesit
ID: 11818168
All right, you can use a BAT (=batch) file.

Create a text document in the same directory as the files you want to rename. It should contain the following instructions:

   copy *.txt *.xml
   copy *.txt *.hsk
   copy *.skc *.mol

Then save the file with a BAT extension (in the Save As type drop-down menu, select All Files, and type the full filename and extension in the File Name field (e.g. testfile.bat)).

Double-clicking on the bat file will open the command prompt, copy the files, then close the command prompt. The target files should be in the same directory as the source files and BAT file.

Does this work for you?
0
 

Author Comment

by:johndacs
ID: 11818399
Liam,

The problem with this is that it returns short filenames. If I do that I would have to rename the filenames one by one to their long filenames. I'm using Windows 2000 OS.

Regards,

John
0
 
LVL 1

Accepted Solution

by:
johndoesit earned 250 total points
ID: 11839729
Okay, last try:

There is a freeware by RjH Software called rjhExtensions which allows batch renaming under Windows (as opposed to DOS).  It can be found here: http://www.rjhsoftware.com/rjhextensions/

After installing the program, copy the TXT files to two folders which will eventually contain the HSK and XML files (so you have three sets of identical TXT files).  Open one of the folders and select all the TXT files that are there. Right-click and select the new option 'Rename files...' from the menu. Enter    *    for the name and    xml    for the extension. You can preview the result by clicking the Preview button.

Repeat for hsk and mol.

Hope this helps.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Purge \Deleted Items? 2 30
Excel style change characters to English characters. 2 18
Excel Data Validation Help 9 44
Pull Name and Phone out of Cell 2 14
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question