Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Copy TXT files as XML and HSK and SKC as MOL

Posted on 2004-08-15
5
Medium Priority
?
526 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
  • 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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Lost Word File? Eagerly, need it back? Read ahead; this File Recovery guide is for you.
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…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

916 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