View Single Post
Old 12-12-2008, 05:09 PM   #98
bbusybookworm
Tech Junkie
bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'bbusybookworm knows the difference between 'who' and 'whom'
 
bbusybookworm's Avatar
 
Posts: 1,027
Karma: 10080
Join Date: Aug 2007
Location: Earth
Device: iPad, MotoXStyle, OnePlusOne
Quote:
Originally Posted by DaleDe View Post
Actually one batch should do it.

The command would appear like:

For %%i in (*.pdb) Do command parameters.

Where command is the python script and the parameters are the standard arguments for the script. Use %%i wherever you need the file name.

For help open a cmd window and type: help for
The following Syntex works to Pick up the file name

Code:
For %%i in (*.pdb) Do ereader2html.py %%i Foldername "My Name" 12345678
But How can I get it to get the folder name from the file name itself without gaining the pdb extension?

Just Dropping the %%i instead of the folder name is obviously not going to work.

Code:
For %%i in (*.pdb) Do ereader2html.py %%i %%i "My Name" 12345678
While adding an additional character to that i.e. %%i-1 does work, it still leaves the .pdb extension as part of the Foldername.

Code:
For %%i in (*.pdb) Do ereader2html.py %%i %%i-1 "My Name" 12345678
So when the file name is xyz.pdb, the output folder comes out as xyz.pdb-1


While it is a great improvement in terms of speed from my previous approach and I appreciate you help i this , I'll like to get rid of the pdb from the Folder name .
bbusybookworm is offline   Reply With Quote