1

(16 replies, posted in How to ...)

OK, some more thinking... smile If I could check the 5th character from the left of a 8-character DOS filename and if it's a 0(zero), then grab 5 digits from the right to get the job number. If that 5th character is a number 1-9, then grab 4 digits from the the right to get the job number. Is this possible with RegEx? Thanks!

Tommy McClain

2

(16 replies, posted in How to ...)

OK, now I feel a little dumb. Found a more useful expression...

z:\Projects\\%N\\%b.%e

It doesn't get all of the files, but comes close. I still have de-select a few stragglers, but it should work better for one of my directories. Unfortunately, I have another directory where all 8 characters are numbers. So just picking the last 4 digits won't get the jobs that have a 10000+ job job number. If I pick the last 5 digits, then the 4-digit job numbers won't get placed right. I will probably have to do 2 different expressions for those files. One to get the 10xxx files and another to get the xxxx files. Oh well. Can't win them all. smile

Tommy McClain

3

(16 replies, posted in How to ...)

FYI, the reason I'm keying on those 4-5 digits is because those are job numbers. About a year ago we hit job #10000. I'm not actually renaming the actual files, just moving all the files associated with a job number to their own subdirectory named by their job jumber.

Tommy McClain

4

(16 replies, posted in How to ...)

OK, I thought I had the right expression, but I'm starting to realize that since my directory has all kinds of files in it, I havning problems filtering only the ones I need to rename. All the files I want to rename should be in the format: ????####.* Where ?=character(could be 0-4 characters), #=number and *=character(could be any number of characters). We tried to stick to a 8.3 DOS format for all files. Unfortunately we exceeded 9999 and went to naming files using ???#####.* I pretty much figured I needed to take care of the 5-digit filenames first, and then work on the files that had 4 digits. But I was hoping maybe somebody could give me another suggestion. Here's what I have so far...

4-digit files...
z:\Projects\\%bd(-4)\\%b.%e

5-digit files...
z:\Projects\\%bd(-5)\\%b.%e

I was hoping there was some kind of expression for including only files that the last 4 characters of the 8-character filename were numbers (ex: 0000-9999).

I've checked the directory and there are about 31,000 files in this one directory. About 3100 files are 5-digit filenames (ex. 10000-10999). The files haven't got into 11000, but they will soon.

Any help you can provide would be greatly appreciated. Thanks!

Tommy McClain

5

(16 replies, posted in How to ...)

Thanks again Stefan! That works just fine. I will just have to delete or ignore the first field/column when I start parsing it. I'll leave you alone now. I'll probably post again once I've completed the whole process. Wish me luck!

Tommy McClain

6

(16 replies, posted in How to ...)

Remi, thanks again for the reply!

I already have the full path I need for the Future column. Here's an example expression I've already created for the destination files.

c:\Projects\\%b(5)\\%b.%e

But I need the Current Name column to include it's full path too. Right now it only shows the filename.

Tommy McClain

7

(16 replies, posted in How to ...)

Excellent replies Remi and Stefan! Thanks so much! It's very helpful. Remi, you have an excellent program. It looks like it will do exactly what I need it to do. Provided I create the correct expressions. wink So far, I think I've got a handle on a few that I will need. Wish me luck.

There is only one issue I have with the copy to clipboard function. There's no full path of the directory for the Current Name column. My simple text database file includes the full path name of the file and since I'm going to be moving the file from one directory to another, I really need the Current Name to include the full path too. Now, I can get around this issue easily since the path for 90% of the files in my database file are exactly the same. All I have to do is paste that same path at the beginning of every line in the clipboard contents. However, with so many files it would be nice if they already had the full path from the start.

As for AutoHotKey, I looked at it briefly a couple of months ago when I was looking for a simple batch/scripting language. Since Stefan was so kind to provide me with a sample script I will definitely give it a try. Thanks Stefan! BTW, it's been a couple of years, but I used to write Perl scripts for a website I worked on. A lot of them would do parsing of HTML files or simple CSV files. But it's been so long that think I've forgotten how to do them. Oh well. I'm sure I can get AutoHotKey and your script to do a simple parse.

Tommy McClain

8

(16 replies, posted in How to ...)

I need to rename a lot of AutoCAD drawings files(10,000+), but when I do this it will break the location for the project for each of the drawings. The directory and file names are stored in a simple text database file. I would like to be able to use the same expressions used in Siren to update the location of all those drawings inside the database file to their new location. Is there any way to do this with Siren? Thanks in advance for your help.

Tommy McClain