• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

  • View as cloud  | list

+ Similar Blogs

photo

Lotus Nut

111 Entries |  Chris Whisonant
Updated 
RatingsRatings 23     CommentsComments 157
photo

Big Mutant Bl...

49 Entries |  Michael Smelser
Updated 
RatingsRatings 1     CommentsComments 49
photo

Yellow is the...

72 Entries |  Tim Tripcony
Updated 
RatingsRatings 2     CommentsComments 34
photo

Patrick Picar...

62 Entries |  Patrick Picard
Updated 
RatingsRatings 2     CommentsComments 112
photo

off the Hook ...

53 Entries |  Scott Hooks
Updated 
RatingsRatings 6     CommentsComments 81

+ Blog Authors  

1 - 2 of 2
  • Previous
  • Next
  • Page   1

Lotusscript to rename downloaded files

Karl-Henry Martinsson |   | Tags:  downloads code lotusscript | Comments (1)  |  Visits (889)
Duffbert and Jim Casale both blogged about the cryptic names on downloaded files from the IBM Passport Advantage site. Jim's Excel macro inspired me to write something in Lotusscript (I don't even have Excel on my home computers anymore, I am only using Symphony now).

Below is my Lotusscript code. Note that I have not been able to test the actual renaming part, since I am at the office and I have all the files downloaded at home. But the parsing part works. You may want to either modify the location of dlmgr.pro, or even write some code to let the user select the file to process. But I just made a quick-and-dirty hack for now.

Update: Something went wrong earlier when I tried to post this, I got two borked entries. It seems like if I paste certain formatted text (like the code section below) into the entry, and save it while in preview/WYSIWYG mode, it breaks the entry. If I am in HTML code view, it works...
Update 2: Thanks to the guys at Lotus911, they removed the two bad entries. Also, I wanted to clarify, the code is actually copying the files and giving the copy a new name, the original files are still there. If you want to perform a move, un-comment the the line Kill fromfile.

Dim dlmgrfile As String Dim dirname As String Dim filename As String Dim filecode As String Dim filedescription As String Dim temp As String Dim newitem As Integer Dim fromfile As String Dim tofile As String dlmgrfile = "c:\dlmgr.pro" Open dlmgrfile For Input As #1 Do While Not Eof(1) Line Input #1, temp If Left$(temp,6)=".file=" Then filecode = Right$(temp,Len(temp)-6) newitem = True Elseif Left$(temp,2) = ".." Then newitem = False End If If Left$(temp,7) = "..path=" Then dirname = Right$(temp,Len(temp)-7) End If If Left$(temp,8)="..title=" Then filedescription = Right$(temp,Len(temp)-8) End If If Left$(temp,7)="..name=" Then filename = Right$(temp,Len(temp)-7) End If If newitem = False Then If filename<>"" Then If dirname<>"" Then If filedescription<>"" Then fromfile = dirname & "\" & filename tofile = dirname & "\" & filedescription & Right$(filename,4) Print "Copying " & fromfile & " to " & tofile Filecopy fromfile, tofile ' Kill fromfile dirname = "" filename = "" filedescription = "" filecode = "" End If End If End If End If Loop Close #1
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.
No RatingsRatings 0

Birthday wishlist

Karl-Henry Martinsson |   | Tags:  photography life | Comments (0)  |  Visits (460)

In a couple of weeks I turn 40, and I am going back home to Sweden for my birthday. It will be the first time I celebrate my birthday in Sweden since 1997. My sister asked me a couple of weeks ago if there was anything special I wanted for my birthday. I could not think about anything back then. Honestly, birthdays are not a big thing anymore. The last few years I been baking myself a birthday cake and pretty much celebrated it by myself. A couple of years I been going out with friends, but rarely on my actual birthday. I am not even used at getting any big gifts, usually I get a card and something small from my son. One year I got a miniature multi-tool than fit my keychain.

The last "big" birthday gift I got was 5 years ago, the first one after my divorce. My two best friends (one living in Sweden and one in England) bought me the Special Collectors Platinum Edition of The Fellowship of the Ring on DVD. However, the delivery man left it on the front porch, since I was at work, when I came home it was stolen (but the thieves left the box) and the house had also been broken into. Amazon sent a new one without extra cost, though...

So the other day I was thinking, what would I wish for if I did not have to limit myself to what I know my sister's budget is limited to? I have a pretty nice digital camera, a Sony Cybershot DSC-H2, but it would be nice to take the next step and go for a DSLR. So I started doing some research, and even went to a camera store the other day after work. Also, my best friends boyfriend is a big photo enthusiast, and I asked him a few questions. So now I think I know what I would like. :-)

My choice would be a Nikon D90 body ($899) with a Tamron AF18-270mm f/3.5-6.3 lens ($599).  The lens equals 15x optical zoom and seems to be a great all-in-one lens for me. Later I can get more/other lenses, depending on what I end up taking pictures of.
One of the features I liked, and which made me choose the D90 instead of the older but less expensive D80 or D60 is the LiveView, that you can use the LCD display on the back as viewfinder. On my current camera I use this about 30-50% of the time, and it is a very nice feature. I am sure I would have missed that.

Of course, I know this is way more than my sister is going to buy me. She thought the $379 I paid for my Sony H2 (or equal amount for the Casio Exilim I got her for her 35th birthday two years ago) was expensive... Or rather, she does not like to spend money on things like that that she consider not necessary. Of course, I knew she wanted a camera, and she was very happy with it. Her previous camera took about 2 seconds to take a picture, and by then the motive was usually long gone.

But at least I can dream. And in a year or so the price should have dropped, and I might be able to afford it. Or I might meet and marry a rich girl. :-)

No RatingsRatings 0

  • Previous
  • Next
Jump to page of 1
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About