How add a prefix to file names? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How add a prefix to file names?

PeytonPeyton Atlanta, GeorgiaPosts: 2Member

I want to add the same prefix to a large number of files, all with the same extension, but all having long file names with spaces in them. I found the following code at

LFNFOR On FOR %v IN (*.txt) DO REN %v abc%v.x REN *.x *

When I try it without LFNFOR, I get an error message - not surprising since I didn't specify long file names.

However, when I key in LFNFOR, I get an error message just from typing that.

My PC is 64-bit Windows 7.

Thanks in advance for your help.


Sign In or Register to comment.