Store Favorites / Login Information

I have created a program that generates a list of all of our ftp accounts (about 100) and want to add them to the favorites of smartftp automatically.

Can anyone tell me where the favorites are stored (registry, files, etc.. ) and any suggestions on how i can accomplish this task.


Bullets:

1. Need to clear all favorites.
2. Need to store all ftp sites, usernames and passwords

Thank you,

Justin

Hello ...

The SmartFTP SDK can help you with that:

Favorites Location:
1. The personal favorites are stored in the %AppData\SmartFTP\Client 2.0\Favorites folder by default.
2. Each favorite is stored in one xml file
3. To delete all folders delete all files and sub folders in the Favorites folder in 1.

To Create/Import Favorites:
1. Download and install the SmartFTP SDK from: https://www.smartftp.com/Products/SDK/SmartFTPSDK.exe
2. Register all COM Server (Start -> All Programs -> SmartFTP Client SDK -> Register)
3. Take a look at the Samples\Script\Favorites.wsf script in the SmartFTP SDK application folder on how to create a favorite programmatically.

BTW: If you would like to share your Favorites import script we can include it in the SDK.

Regards,
Mat
SmartFTP

Thanks,

As soon as i get it working, I will post here it


Justin

I have the script writing xml files to the appdata directory, But SmartFTP doesn't seem to recognize them.

Do they need to have GUID names like to other ones ?

Hello ..

Yes. The name of the file needs to be a unique GUID. You can use the GuidMaker to create a GUID:
https://www.smartftp.com/Products/SmartF ... dMaker.rar

Regards,
Mat

Thanks again,


Justin

Great, My script works perfectly, I will clean it up and post it for you later today.

Ok, Version 1 is done:

http://www.binarysavant.com/files/FavoritesImporter.wsf

This handles the file download from the webserver, and importing of all the favorites.

I use a batch file to remove the existing favorites, but since it is specific to my machine i wont post it, I can post a configurable one at a later time.

Thanks,

Justin Milly

Thank you. Nice work ;-)

I have the following comments (only minor things):

1. It's probably better to set the Protocol of the FavoriteItem instead of relying on the default value:
' ftpProtocolNormal = 0
' ftpProtocolSSLImplicit = 1
' ftpProtocolSSLExplicit = 2
objFavoriteItem.Protocol = ftpProtocolNormal

2. CSV format is not defined.
The following CSV format is expected:
Name, Host, Username, Password

3. Typo:
' Smart FTP 2.5 -- Favorites Importer.
It's
' SmartFTP Client 2.5 -- Favorites Importer

and
install them into smart ftp.
-> install them into SmartFTP Client.

and
Auther -> Author

Remarks:
In case you are importing the favorites from another FTP client product you can directly use the importer classses. e.g.
Set objImporter = WScript.CreateObject("sfFavorites.FavoritesImportCuteFTP")
objImporter.Import(strCuteFTPFile, strLocalDestinationFolder)
or
FTPFavoritesImportURLList if you have text file with URLs
or
FTPFavoritesImportFTPVoyager->ImportCSV() if you want to use the CSV format FTPVoyager uses.


If you want me to make the changes and send you the update by email please let me know.

Thanks
Mat
SmartFTP

Any changes you have would be great, VBScript is not my best language.

Also, I am adding ftp path to the csv.
The FTP Conenction type, SSL, etc.. should be added to the CSV as well.

Please check your PM

I read it, I will be taking off for today, I will send you the email tomorrow with my changes.

Thanks

I sent the files to you.

Thanks,


Justin

Is it possible to also clear the quick connect history? because it lists tons of invalid entries after the script clears and re-enter's all the favorites.

I have implemented the requested feature. It will be available in the next version.

Once released you can use it the following way:

objApplication.History.Items.RemoveAll()

Regards,
Mat