Simple VB to create a synctoy exe command RRS feed

  • Question

  • I'm trying to use VB 2008 Express to create a simple exe that will run a SyncToy folder pair.  This way I can set it to autoplay that exe when I plug in my iPod.  (Man I have really done a lot of things to mimic the positives of using iPod/iTunes functionality without using iTunes)

    So I know very little about VB or any programming, but I managed to get it to work using just:

    Code Snippet

    Module Module1

        Sub Main()
            Console.WriteLine("SyncToyCmd.exe Starting")
            Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"))
            Shell("""C:\Program Files\SyncToy 2.0 Beta\SyncToyCmd.exe"" -RPodcasts")

        End Sub

    End Module

    I want to pipe the log file out to a txt file, but using the obvious doesn't acomplish this.  The sync still runs, but no log file is created.

    Code Snippet

    Shell("""C:\Program Files\SyncToy 2.0 Beta\SyncToyCmd.exe"" -RPodcasts > C:\Users\Me\Documents\SyncToyData\log.txt")

    I really want the log file to be named according to the current date/time. So there would be another function for that, but for now I can't even get it to save to a constant file name.  I realized after I started typing this that it would probably be better suited for a VB forum, but oh well.  Does anyone know how to code this?
    Saturday, February 23, 2008 9:21 AM