custom string compare?

#1
I have a MoveAll.btm - which moves all files in a folder tree to C:\Z_UserFiles\Multiedit\DEL_000\ for instance; However in debugging the moves some files ended up in the wrong folder, for instance YahooMessenger and not Multiedit. Therefore I'd like to compare the files location to where the routine "thinks" it should be. How would I compare

C:\Z_UserFiles\MultiEdit\
with

%@path[%tFile] ?

I looked at @similar but not sure what value would be the breakpoint as to if I need to actually move the file? Any thoughts?

I have attached the BTM ........
 

Attachments

Apr 13, 2010
236
3
58
The Hague
#2
I have a hard time understanding your question, even after taking a look at your code.

I understand that you are sorting files into classes based on their extension and some additional rules. The tests should yield a target path for each file.

In order to help you, I need to understand where the custom string compare fits into you question.
 
Apr 13, 2010
236
3
58
The Hague
#4
1) I noticed a line "goto here" and two labels: "here" and "heere". Are these as intended?

2) For readability and disambiguity replace %pTGT% with %[pTGT]

3) This numbering scheme you are using: could you use @version[] ? If not, what is it for?

4) Now where and how does the string compare come in?
 
#5
1) I changed the outer to use :Cleanup and the inner one to use :Here

2) Should I do the same for all my % vars?

3) I don't want to replace files that already exist - that is why I use %[nNum]

4) See my two examples - search for "e.g." - around line 288
 

Attachments

Apr 13, 2010
236
3
58
The Hague
#6
ad 3) I thought so. Could you use @version?

ad 4) You are making separate subdirs. Could you group versioned files instead? (keep files together in 1 subdir but with a number in the filename?)

And, would you be so kind to point me to the line in your code that fails? The string compare?

I also add an alternative implementation, just for fun and to keep you on your toes ;-)

DJ
 

Attachments

#7
re 3: since I am working with various types of files, BAT, BTM, JPG, GIF, MPG, I do not think @version would be of much use here.

re 4: I don't want to mess with the filename - just with adding subdirs

q5: And, would you be so kind to point me to the line in your code that fails? The string compare?
I am just not sure how to handle coding the compare %[TGT] and %@path[%[fn]] -

q6: I also add an alternative implementation, just for fun and to keep you on your toes ;-)
I will look at your new BTM and reply later....
 
#9
@djspits sorry about the delay in responding, life has a bad habit of getting in the way sometimes. Anyway I did some additions to the MoveAll.btm - as you can see, and made one change as to where one of the file extension matches goes. I'd very much appreciate seeing what you had in mind for the rest of the code.
 

Attachments