[Solved] Renaming files with CMD

Forum for anything else which doesn't fit in the above forums. Site feedback, random talk, whatever, are welcome.
Post Reply
User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

[Solved] Renaming files with CMD

Post by jamesbebby » Thu May 14, 2009 7:42 am

hi, there 2 thing i would like to crack,

1. is renaming files with cmd, vbs or anything that can do it

2. is that i hav a 1tb usb harddrive with a fair few folders in it, i like the folders to be organized in a certain way (only the first alot of folder you see) the problem is when i install a fresh copy of windows xp and open the drive all the folders are obviously not in the same order, i was wondering can i make some kind of file that will keep them in order? desktop.ini?:?
cheers james
Last edited by jamesbebby on Tue Jun 02, 2009 2:44 pm, edited 1 time in total.

OuTman
Posts: 171
Joined: Wed Jul 05, 2006 6:40 pm

Post by OuTman » Thu May 21, 2009 9:54 pm

Hi James

1) you can rename files/folders with almost every programming/scripting language, including of course Batch, which has the advantage to be quick to learn. However it suffers from a lot of limitations. The real question is what kind of processing to you want to apply. Without more description we couldn't advice more than that :p

2) you mean displaying order of folders inside Explorer? this order cannot be altered. all you can do is renaming with tricks like this "1 - my first folder", "2 - my second folder", etc.
personally I sometimes name the most important folder of a huge serie "- my folder -" so it is displayed at the top

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Fri May 22, 2009 6:47 am

hi,
1) i would like to rename desktop shortcuts.
2) i would like windows to memorise this layout of my folders in my usb drive

Image
thanks james

User avatar
Kelsenellenelvian
Moderator
Posts: 4383
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Post by Kelsenellenelvian » Fri May 22, 2009 8:10 am

You are reaching WAYYYYY too far m8!

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Fri May 22, 2009 8:14 am

Kelsenellenelvian wrote:You are reaching WAYYYYY too far m8!
maybe? but can it be done? i only want the first lot of folders to be memorized.
thanks james

User avatar
Kelsenellenelvian
Moderator
Posts: 4383
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Post by Kelsenellenelvian » Fri May 22, 2009 8:21 am

Sure renaming shortcuts isn't too hard.

As for the folder layout I don't think there is a way.

ccl0
Posts: 817
Joined: Tue Jan 02, 2007 1:56 am

Post by ccl0 » Fri May 22, 2009 12:14 pm

why would you want to? that layout is ugly lol

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Fri May 22, 2009 1:56 pm

ccl0 wrote:why would you want to? that layout is ugly lol
coz it makes life easy, dont really care what it looks it lets hav a look at your nice pretty little layout then lol

ccl0
Posts: 817
Joined: Tue Jan 02, 2007 1:56 am

Post by ccl0 » Fri May 22, 2009 2:02 pm

i use rocketdock. maybe you should look into it

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Fri May 22, 2009 2:20 pm

ive heard of that, not really a great fan of all the that fancy stuff, but thanks anyway :)

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Fri May 22, 2009 11:51 pm

I could remember there are some utilities helps you save/restore desktop layout, try google "save desktop icon arrangement".

but i don't know if there is any way to do so for a certain folder. good luck.
Image
My work list(Hosted by dumpydooby)

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Sat May 23, 2009 10:30 am

hi, im havin no luck renaming files with a cmd, something that sounds and looks so easy what am i doing wrong?

RENAME "%UserProfile%\Desktop\new.txt old.txt"
thanks james

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Sat May 23, 2009 10:58 am

You're using quotes incorrectly. Try the following:

Code: Select all

REN "%UserProfile%\Desktop\new.txt" old.txt
or

Code: Select all

REN "%UserProfile%\Desktop\new.txt" "not new.txt"

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Sat May 23, 2009 3:02 pm

the first one works thanks, How do put a space between 2 words?
cheers james

User avatar
crashfly
Posts: 789
Joined: Thu Mar 13, 2008 11:39 pm
Location: Arkansas, USA

Post by crashfly » Sat May 23, 2009 6:28 pm

To rename something that has a space in it, you must use quotes.

rename "something with quotes.txt" "something else with quotes.txt"

As long as both file names have quotes, you should be good to go.

EDIT: Note that <ren> is just a shortened form of the <rename> command.
A mind is like a parachute, it only functions when it is open.
--Anonymous

How to Ask Questions the Smart Way

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Mon May 25, 2009 1:03 am

hi, works great thanks, why can't http://www.ss64.com/nt/ren.html explain it like that?
cheers james

User avatar
crashfly
Posts: 789
Joined: Thu Mar 13, 2008 11:39 pm
Location: Arkansas, USA

Post by crashfly » Mon May 25, 2009 1:16 pm

The person that made that page probably did not have 'long file names' in mind. Long file names are only applicable in those operating systems that support it. Besides, unless you are in a command prompt of one of "those" operating systems, you will not see long file names. Many of the older DOS version *only* used short file names.
A mind is like a parachute, it only functions when it is open.
--Anonymous

How to Ask Questions the Smart Way

Post Reply