I don't know if this is possible.
I have to scan 300 A4 sheets using Omnipage software and save each one with a different filename. The filenames that I need to use are in a separate textfile.
Thx,
John
File Naming in conjunction with scanning software
Moderators: Dorian (MJT support), JRL
-
- Pro Scripter
- Posts: 50
- Joined: Fri Mar 23, 2007 10:14 am
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, that's possible. Just loop through the file with the ReadLn function - see the help file. In each loop iteration perform the scan and output using the line read by ReadLn as the filename.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 50
- Joined: Fri Mar 23, 2007 10:14 am
Thnaks
Thanks Marcus, it works a treat. The software appends and underscore and 4 digits to the end of the filenames for indexing, is there a way to rename all the files to take away the appended stuff?. Is it a getfiles and another loop?.
Thx,
John
Thx,
John
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
You can use string manipulation commands. E.g. the following code is one way to find the position of the underscore and remove it plus the following 4 characters:
Not sure if that's exactly what you want but hopefully you get the idea. A more elegant approach would be regular expressions using VBScript, but that's not for everyone.
You can use string manipulation commands. E.g. the following code is one way to find the position of the underscore and remove it plus the following 4 characters:
Code: Select all
Let>filename=somefile_1234.dat
Pos>_,filename,1,p
Let>en1=p-1
MidStr>filename,1,en1,part1
Let>st2=p+5
Length>filename,lenf
MidStr>filename,st2,lenf,part2
Let>filename=%part1%%part2%
MessageModal>filename
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?