Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Desktop Shortcut Renamer
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Prince Pwn




PostPosted: Fri Nov 17, 2006 11:09 pm   Post subject: Desktop Shortcut Renamer

I was bored and wanted to make a program that can actually be useful for those with cluttered desktops and need to rename some shortcuts.

code:

loop
    loop
        View.Set ("graphics")
        cls
        View.Set ("text")
        var shortcut, newName, fileName : string
        var dir : string := "C:/Documents And Settings/" + Sys.GetUserName + "/Desktop/"
        var stream : int := Dir.Open (dir)
        for i : 0 .. stream
            fileName := Dir.Get (stream)
            exit when fileName = ""
            if fileName (1) not= "." then
                if fileName (length (fileName) - 2) = "l" and
                        fileName (length (fileName) - 1) = "n" and
                        fileName (length (fileName)) = "k" then
                    for x : 1 .. length (fileName) - 4
                        put fileName (x) .. %, "(" + intstr (length (fileName)) + ")"
                    end for
                    put ""
                end if
            end if
        end for
        put ""
        put "Enter a desktop shortcut name: " ..
        get shortcut : *
        if not File.Exists (dir + shortcut + ".lnk") then
            put Error.LastMsg
            put "Press any key to restart"
            Input.Pause
            exit
        end if
        put "Now what do you want it to be called? " ..
        get newName : *
        File.Rename (dir + shortcut + ".lnk", dir + newName + ".lnk")
    end loop
end loop
Sponsor
Sponsor
Sponsor
sponsor
DemonZ




PostPosted: Sat Nov 18, 2006 1:58 pm   Post subject: (No subject)

Ill admit this is quite a useful program if u think about it, it reminds me of the desktop cleanup wizard, but I think you can make the program a bit more graphic, to make it look easy to use, try using GUI commands to make the interface look more "cooler", and maybe if u plan on upgrading this program, try to make it so that will create a folder called "unused shortcuts" and have the program move all of the unused shortcuts to that folder, sort of like desktop cleanup wizard, or have it delete shortcuts the user specifies. But overall good program, but it could use a bit more work on the graphics side.
Prince Pwn




PostPosted: Sat Nov 18, 2006 10:03 pm   Post subject: (No subject)

Yeah I could work on the graphics, but I like text =)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: