Author |
Message |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
Hi all, Next week I start a new job. The job is to rename a few thousand files to conform to a naming standard. I know part of the naming standard will have the creation date, then a hyphen, then the project/file name, plus a load of optional 'flags' (stupid naming convention by the sounds of it). So, I know I can use a combination of ls, sed, awk and for each loops on a UNIX environment to do most of the work for me... Can I use these same tools under Windows? And will they work the same (output can be different, but flags/formatting would be annoying if different)? I think I'll be using some form of Windows XP, and doubt I'll be able to install anything apart from the base set of applications. Thanks for your help  Ben
|
Wed Jul 01, 2009 3:44 pm |
|
 |
AlunD
Site Admin
Joined: Fri Apr 24, 2009 6:12 am Posts: 7011 Location: Wiltshire
|
Don't know if its the best way of doing it but I'd use VB / VBA ( in office ) holding the variables in a spreadsheet etc.
_________________ <input type="pickmeup" name="coffee" value="espresso" />
|
Wed Jul 01, 2009 3:56 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
I don't think I need anything that complex The way I see it, is something like this: Not sure if that'll work, not tested it yet, but it should work relatively well...But I've no idea if that would work under Windows 
|
Wed Jul 01, 2009 4:23 pm |
|
 |
AlunD
Site Admin
Joined: Fri Apr 24, 2009 6:12 am Posts: 7011 Location: Wiltshire
|
It was that bit I was thinking about. Not knowing how complex that would be to work out.
_________________ <input type="pickmeup" name="coffee" value="espresso" />
|
Wed Jul 01, 2009 4:29 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
Ahh yes  ...From the limited information I've been told so far, it looks like make of the optional flags won't be used for the majority of the files...So I was thinking about adding them in by hand after...
|
Wed Jul 01, 2009 4:37 pm |
|
 |
big_D
What's a life?
Joined: Thu Apr 23, 2009 8:25 pm Posts: 10691 Location: Bramsche
|
Have a look at Windows PowerShell, an update for XP and part of Vista and Windows 7 (although I think it came as part of SP1 or SP2 with Vista).
_________________ "Do you know what this is? Hmm? No, I can see you do not. You have that vacant look in your eyes, which says hold my head to your ear, you will hear the sea!" - Londo Molari
Executive Producer No Agenda Show 246
|
Wed Jul 01, 2009 5:44 pm |
|
 |
JJW009
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:58 pm Posts: 8767 Location: behind the sofa
|
I'm afraid I'd probably use Excel / VBA. Import the detailed file list, and then it's easy to see what you're doing before you hit the "GO!" button.
_________________jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly." When you're feeling too silly for x404, youRwired.net
|
Wed Jul 01, 2009 6:09 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
Have a look at the link in my "Finding files in a batch file" thread.
I did some fairly advanced stuff just using batch files.
Some very nice resources.
|
Thu Jul 02, 2009 10:13 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
Cheers Oli 
|
Fri Jul 03, 2009 5:52 am |
|
 |
Xenos
Has a life
Joined: Wed May 27, 2009 9:33 pm Posts: 12
|
You can get varieties of all your favourite shell script utilities for windows. I have some of those you've mentioned. Try http://gnuwin32.sourceforge.net/Maybe cygwin could be useful too?
|
Sat Jul 04, 2009 11:09 am |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
Thanks Xenos, until Monday I'm not sure if I can install new apps 
|
Sat Jul 04, 2009 11:22 am |
|
 |
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
I would have said cygwin, and then your favourite *nix commands. Pester people for it! A computer without a Bash is a computer that is unhappy.
|
Fri Jul 10, 2009 7:38 pm |
|
|