Solved

Copy TXT files as XML and HSK and SKC as MOL

Posted on 2004-08-15
5
518 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

615 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