Batch file help again

]SK[

One of Freddy's beloved
Joined
Dec 22, 2003
Messages
302
Im basically trying to make a batch file create a list of files of a directory in a txt file.
It currently creates the list ok with just the list of filenames. The problem is im wanting to omit the extension from the file names. I know you could do this from notepad and do a replace but I want it to be automated. Possible?
 

RedVenom

Banned
Joined
Jan 22, 2004
Messages
160
Not under just a DOS prompt.

You could use something like... damn. Can't remember its name, but there was a program that ran a series of keystrokes, which you then ran under task scheduler. Horribly convolouted, but got the job done.
 

Jupitus

Old and short, no wonder I'm grumpy!
Staff member
Moderator
FH Subscriber
Joined
Dec 14, 2003
Messages
3,292
Not possible as far as I can see under DOS unless all of the file extensions are identical in which case you could rename all the files, make the list, and then rename them again putting back the extension (possibly)... however, you could also trigger events from the DOD batch file to open a word file which has the replacement necessary to the file stored as a macro form in self-launch and then closing word afterwards. Convoluted, yes, but would probably do the trick.
 

]SK[

One of Freddy's beloved
Joined
Dec 22, 2003
Messages
302
Ive got a solution for now although it uses the sed command from unix, converted to win32. Does what I need.

I used to use a program called ezmacros to move the mouse and click certain objects on screen over and over if thats what your talking about RV. BT for some reason replaced the engaged tone with a speaking woman telling me the lines engaged. Sadly my modem didnt recognise this and held the line up instead of redialing.
 

RedVenom

Banned
Joined
Jan 22, 2004
Messages
160
Its the same sort of thing, but worked on key strokes rather than mouse positions. It was a great program, although I have no idea what it was called...
 

babs

Can't get enough of FH
Joined
Dec 30, 2003
Messages
1,595
Windows 3.1 had a very useful macro recorder.
 

phlash

Fledgling Freddie
Joined
Dec 24, 2003
Messages
195
You can use the extended 'for' command under Win2k/XP to parse text (in particular you can break it up on a specified separator like '.'), which might be capable enough for your task, and rather more portable than having to install a port of 'sed' :)

Check the online help!
 

Users who are viewing this thread

Top Bottom