Solved

Copy TXT files as XML and HSK and SKC as MOL

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

910 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now