windows explorer, identify file to select

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
nahguam
Newbie
Posts: 8
Joined: Tue Jun 15, 2004 4:03 pm

windows explorer, identify file to select

Post by nahguam » Wed Jun 16, 2004 10:00 am

Hi,

I want to open windows explorer to a certain folder, which I have done:
Run Program>C:\WINDOWS\explorer.exe c:\MyFolder
WaitWindowOpen>MyFolder*
SetFocus>MyFolder*
Then I want to select a paricular file, defined by a variable previously in the script. ie. MyFile%file_number%.exe.

Once selected, I want to right-click > Winzip > Add to MyFile%file_number%.zip. This bit I have also managed.

My problem is the selecting of the named file.

Any ideas?

nahguam
Newbie
Posts: 8
Joined: Tue Jun 15, 2004 4:03 pm

Re: windows explorer, identify file to select

Post by nahguam » Wed Jun 16, 2004 10:07 am

I have found a crude workaround...

at first, prepend the file with an underscore ie _MyFile%file_number%.exe so that it always appears at the top of the list in windows explorer. So all I have to script is TAB, TAB then the file is highlighted, so that I can work with it. Then just rename the zipped file, removing the underscore.

I would still appreciate any better ideas...

Lumumba

Post by Lumumba » Wed Jun 16, 2004 1:51 pm

Have you ever thought about to compress your file(s) with pkzip/winzip from the commandline ?

It's more reliable (no mouse & click & window open and performance or not ...)

nahguam
Newbie
Posts: 8
Joined: Tue Jun 15, 2004 4:03 pm

Post by nahguam » Wed Jun 16, 2004 3:41 pm

Lumumba wrote:Have you ever thought about to compress your file(s) with pkzip/winzip from the commandline ?

It's more reliable (no mouse & click & window open and performance or not ...)
good idea! Although I'm having trouble downloading the command-line addon, so I'll leave it be for now.

Yes, I try and stay away from mouse-clicking. very unreliable. I try and stick to window names, ALT shortcuts etc...

I changed my mind with the above problem too. Rather than using right-click to create the zip file, I now open winzip and create new archive. Much simpler code for my sript and more reliable. But I will go with your advice once I can get it downloaded.

This brings me to my next problem. After creating the zip file I need to CopyFile> with a variable for the filename, taken as user input earlier in the script; then delete the old zip. I tried to put some error checking in so that it would loop if the delete check failed. My problem is that it always fails. Even when I have verified that the original was deleted, the try-again prompt always displays.
Label>del_zip
DeleteFile>C:\Folder\File.zip
IfFileExists>C:\Folder\File.zip,retry,end
Label>retry
Ask>File.zip was not deleted. Do you want to try again? Press 'No' end the script,result
If>result=YES,del_zip,end
Label>end

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jun 16, 2004 3:52 pm

Use Wzcline.exe from WinZip for command line tools.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

nahguam
Newbie
Posts: 8
Joined: Tue Jun 15, 2004 4:03 pm

Post by nahguam » Wed Jun 16, 2004 3:54 pm

Bob Hansen wrote:Use Wzcline.exe from WinZip for command line tools.
yea, that's the one I'm having trouble downloading...

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jun 16, 2004 3:59 pm

Try http://www.winzip.com/downcl.htm for utility with WinZip 9.0

Just did it, 549Kb
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

nahguam
Newbie
Posts: 8
Joined: Tue Jun 15, 2004 4:03 pm

Post by nahguam » Wed Jun 16, 2004 4:16 pm

Bob Hansen wrote:Try http://www.winzip.com/downcl.htm for utility with WinZip 9.0

Just did it, 549Kb
That's the page I'm on. the download link just goes to page cannot be displayed. ... dodgy work conneciton.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jun 16, 2004 4:24 pm

Could it be your browser?

Some browsers don't support all web pages designs. Have found that using Mozilla has eliminated those problems for me.

Free, version 1.6 download from: http://www.mozilla.org/
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts