Remove entries from FTP 'Change Directory' combobox

Remove entries from FTP 'Change Directory' combobox

3
NewbieNewbie
3

    Jul 24, 2009#1

    How can I remove entries from the FTP 'Change Directory' combobox? For some accounts the list has grown quite large, and there are lots of directories I don't use any more.

    6,687587
    Grand MasterGrand Master
    6,687587

      Jul 26, 2009#2

      I never used the FTP feature of UE, and so don't know where the directories are really stored. But the directories can be only saved
      • in %APPDATA%\IDMComp\UltraEdit\uedit32.ini
        (or whatever is displayed at Advanced - Configuration - Application Layout - Advanced at bottom for INI file location if not using default location or default name for INI file), or
      • in the file specified at Advanced - Configuration - FTP on using Store FTP accounts and settings in user selected file, or
      • in %APPDATA%\IDMComp\Common\FTP Accounts\IdmFTPAccounts.txt on using Share FTP accounts also at Advanced - Configuration - FTP.
      You should be able to open the file and delete the not anymore used directories.

      %APPDATA% references the value of environment variable APPDATA containing the path to the hidden application data directory of current user account. Just copy and paste %APPDATA%\IDMComp\ into the address bar of Windows Explorer and hit key RETURN or ENTER to get this directory displayed.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Jul 29, 2009#3

        Thanks, the info was in my FTP account user selected file. Unfortunately the paths are stored hex encoded, so it's pretty hard to tell which ones to delete. For example:

        Path History New0=2F6578706F72742F686F6D65

        I was able to delete all of the 'Path History*' entries and start from scratch, which for me is better than having all of the old paths in the drop-down.

        6,687587
        Grand MasterGrand Master
        6,687587

          Jul 29, 2009#4

          Aha, nice to know, thanks.

          Without having a test file I have written quickly a small script which copies the active file to a new file if it contains the case-sensitive string "Path History New" and converts all the path history entries in hexadecimal to ASCII in this new file. So you should get a copy of your file with the account data with readable path history entries. I hope this little script is helpful for you or somebody else.

          Please note: It does not contain any checks on valid data. It is really a quick and dirty script.

          Code: Select all

          // This little script converts path history entries in hex to ASCII.
          
          if (UltraEdit.document.length > 0) {
             UltraEdit.insertMode();
             if (typeof(UltraEdit.columnModeOff) == "function") UltraEdit.columnModeOff();
             else if (typeof(UltraEdit.activeDocument.columnModeOff) == "function") UltraEdit.activeDocument.columnModeOff();
             UltraEdit.ueReOn();
             UltraEdit.activeDocument.top();
             UltraEdit.activeDocument.findReplace.mode=0;
             UltraEdit.activeDocument.findReplace.matchCase=true;
             UltraEdit.activeDocument.findReplace.matchWord=false;
             UltraEdit.activeDocument.findReplace.regExp=false;
             UltraEdit.activeDocument.findReplace.searchAscii=false;
             UltraEdit.activeDocument.findReplace.searchDown=true;
             UltraEdit.activeDocument.findReplace.searchInColumn=false;
             if (UltraEdit.activeDocument.findReplace.find("Path History New")) {
                UltraEdit.selectClipboard(9);
                UltraEdit.activeDocument.selectAll();
                UltraEdit.activeDocument.copy();
                UltraEdit.newFile();
                UltraEdit.activeDocument.paste();
                UltraEdit.clearClipboard();
                UltraEdit.selectClipboard(0);
                UltraEdit.activeDocument.top();
                UltraEdit.activeDocument.findReplace.regExp=true;
                while (UltraEdit.activeDocument.findReplace.find("Path History New[0-9]+=")) {
                   UltraEdit.activeDocument.findReplace.find("[0-9A-Fa-f]+");
                   var sHexPath = UltraEdit.activeDocument.selection;
                   var nPathLength = sHexPath.length;
                   var sAsciiPath = "\"";
                   for (var nCharIndex = 0; nCharIndex < nPathLength; nCharIndex += 2) {
                      var sHexValue = sHexPath.substr(nCharIndex,2);
                      var nCharCode = parseInt(sHexValue,16);
                      sAsciiPath += String.fromCharCode(nCharCode);
                   }
                   sAsciiPath += "\"";
                   UltraEdit.activeDocument.write(sAsciiPath);
                }
             }
          }
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Jul 30, 2009#5

            Thanks, Mofi! That quick and dirty script worked like a charm!