Windows scripting - renaming dos files

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

I'm stumped, wonder if you know if this is possible or not:

I need a script file to run each day that copies photos from one server to

another, then rename the files, getting rid of leading zeroes.

Example:

0010202.jpg needs to be renamed to 10202.jpg

012034.jpg needs to be renamed to 12034.jpg

The filenames are all 6 characters long, but sometimes there are two zeroes

and sometimes there are one. Really it doesn't matter how many zeroes, as

I can just create two separate scripts to handle each type.

Any ideas ?

I've gone as far as playing around in awk on unix to try to get this to

work w/o any luck. I can rename the files correctly renaming the zeroes to

blank spaces, but they can't be blank spaces...

Any help or steering in the right direction would be appreciated !!!!!!!
 
This group is for Microsoft Access.

For Windows scripting questions, try one of the eight Windows scripting
groups that all start with microsoft.public.scripting.

Good luck.

Sco
 
Bob said:
I'm stumped, wonder if you know if this is possible or not:

I need a script file to run each day that copies photos from one server to

another, then rename the files, getting rid of leading zeroes.

Example:

0010202.jpg needs to be renamed to 10202.jpg

012034.jpg needs to be renamed to 12034.jpg

The filenames are all 6 characters long, but sometimes there are two zeroes

and sometimes there are one. Really it doesn't matter how many zeroes, as

I can just create two separate scripts to handle each type.

Any ideas ?

I've gone as far as playing around in awk on unix to try to get this to

work w/o any luck. I can rename the files correctly renaming the zeroes to

blank spaces, but they can't be blank spaces...

Any help or steering in the right direction would be appreciated !!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top