Computing.Net > Forums > Windows XP > Rename filename by removing first part to end

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Rename filename by removing first part to end

Reply to Message Icon

Name: MrQ
Date: October 6, 2009 at 01:42:33 Pacific
OS: Windows XP
Subcategory: Software Problems
Comment:

I want to change the filename by moving the first part of the filename to the end of the filename in a batch.

example:
20090101 - xxxxx - aaaaa.pdf
to
xxxxxxx - aaaaaa - 20090101.pdf

does anyone know a solution for this?



Sponsored Link
Ads by Google

Response Number 1
Name: Ewen
Date: October 6, 2009 at 04:02:10 Pacific
Reply:

Post this in the Programming Forum... linkon the right of this page.

Home Page http://ewen.uuuq.com/


0

Response Number 2
Name: Mechanix2Go
Date: October 6, 2009 at 04:51:38 Pacific
Reply:

This is hardwired to work on PDF files.

==================================
@echo off & setLocal EnableDELAYedExpansion

for /f "tokens=* delims= " %%a in ('dir/b/a-d *.pdf') do (
for /f "tokens=1-3 delims=- " %%i in ("%%~Na") do (
ren "%%a" "%%j - %%k - %%i%%~Xa"
)
)


=====================================
Helping others achieve escape felicity

M2


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Rename filename by removing first part to end

Use Batch to sort lines in a text f www.computing.net/answers/windows-xp/use-batch-to-sort-lines-in-a-text-f/165530.html

Removing Install Rights to Users www.computing.net/answers/windows-xp/removing-install-rights-to-users/9525.html

How to get past ctrl-alt-del login? www.computing.net/answers/windows-xp/how-to-get-past-ctrlaltdel-login/169076.html