ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Check file/folder similarity, rename file when similiraty occurs

(1/2) > >>

Coldiffusion:
I will try to explain my needs simply.

I'm looking for a script/soft which search in a specific folder (and all subfolders) for this :

examplefile1.msf (file with .msf extension)
examplefile1 (file with no extension)
examplefile1.sbd (simple folder)

In this situation the script would be able to detect there is a folder which have the same of a file. (like in the example up there)
and the script would rename the "file1.msf" to "file1.msf.old"

Basicaly it would to that :

-> you launch the soft/script
-> it ask for a folder's path
-> the script check for the similarity I explained up there

if

-> there is a file (.msf) who have the same name than a folder (finishing with .sbd) : it add .old to the extension (example = file.msf.old) or rename (if it's easier) the file from .msf to .old (example = file.old)

-> there is no folders which have the same name : nothing happens


Thanks !
 

fenixproductions:
2Coldiffusion
If you are Total Commander's user then you can use Similarity.wdx plugin.
Just take a look here:
http://fenixproductions.qsh.eu/TCPlugins.aspx#similar

If you don't *maybe* I will write it as standalone tool.

Coldiffusion:
I took a brief look at total commander, it seems like a very powerful tool, 

the problem is I intend to distribute the soft/script to many users (dozens, hundred dont know yet) and I try to keep it simple for them, click here, click here, click here and voila

Anyway if you decide to take some time to write a standalone tool for me, you will be rewarded for your work.

skrommel:
 :) Try this AutoHotkey script!

Almost untested, so please test it before you distribute it or use it on any vital files.

Skrommel


--- ---FileSelectFolder,folder,,2,Please select a folder
If folder=
  ExitApp
Loop,%folder%\*.msf,0,1
{
  SplitPath,A_LoopFileLongPath,name,dir,ext,name_no_ext,drive
  IfExist,%dir%\%name_no_ext%.sbd
  {
    FileGetAttrib,attrib,%dir%\%name_no_ext%.sbd
    IfInString,attrib,D
      FileMove,%dir%\%name_no_ext%.msf,%dir%\%name_no_ext%.msf.old
  }
}

Coldiffusion:
Thanks for quick answer !

Just tested your script skrommel, working nice without any problems.

There are just 2 things I would like to see changed (if it's possible)



The text in red, being able to change it (with a ini file ?)
Remove the blue option (in english : "create new folder")

Navigation

[0] Message Index

[#] Next page

Go to full version