troyg Posted May 14, 2007 Report Share Posted May 14, 2007 Hi There, Wondering if anyone can please assist with this problem we are having? We are using WinZip Command Line interface to create zip files for our clients. However, sometimes it appears to get tied up and when it does, leaves a .TMP file in the directory. However, the first few letters will change, for example being WZ123.tmp or WZ007.TMP etc . . . we've been created a loop, to try and find out if there is a *.TMP file in the directory, however the ‘If File Exist’ command doesn't allow wildcards, so we can't search for *.TMP. Does anyone know how we could work around this? We would greatly appreciate any help! Cheers - Troy Quote Link to comment Share on other sites More sharing options...
Cory Posted May 14, 2007 Report Share Posted May 14, 2007 Sure. Simply do the repeat with folder to return file a file name and test to see if it contains the string "*.tmp" or whatever. Simply do arepeat with folder and then use another string to accumulate the results. Just keep appending to the accumulator and at the end see if it contains *.tmp. Somehting like this: <REP3:07:000001:000001:0001:0:01:c:\><TMVAR2:08:02:01:000:000:><ENDREP><IFVAR2:1:02:7:.tmp><TBOX4:T:1:CenterCenter000278000200:000:ErrorDanger Will Robinson!><ENDIF> Quote Link to comment Share on other sites More sharing options...
Phonemes Posted May 14, 2007 Report Share Posted May 14, 2007 Hi, I used to have a problem with an application generating TMP files on startup. I used ME to check for these files and delete them. This is some time ago and I am not 100% sure, but I believe I had ME check for files with the .TMP extension and delete them. This worked. I don't know why the help says you can't use wildcards with "if file". I believe you can. Just let ME search that directory for "*.TMP". I think this will work. I just wrote a simple test macro which looks for "*.ini" files in a specific directory. I these exist, Notepad should launch. It does. If I change the .ini extensions in that directory, Notepad doesn't launch. Arthur Quote Link to comment Share on other sites More sharing options...
troyg Posted May 15, 2007 Author Report Share Posted May 15, 2007 thank-you so much ! - the 'Repeat with Folder' worked a treat ! - you've no idea of the time you have saved us - these forums are fantastic for everyone to share their knowledge - thanks so much to the ME & PGM community ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.