bored, give me a program to write.

Discussion in 'Programming & Software Development' started by Foliage, Jan 22, 2012.

  1. alwaysaskin

    alwaysaskin Member

    Joined:
    Jan 20, 2012
    Messages:
    75
    yes; a program that will enable me to colour a folder and make all the files in the folder and in subfolders the same colour.

    thanks
     
  2. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,060
    Location:
    Sleepwithyourdadelaide
    How do you colour a file???
     
  3. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,060
    Location:
    Sleepwithyourdadelaide
    Updated the program, same link as before:
    http://dl.dropbox.com/u/1428435/BatchRename.zip

    Made the counter start at 1 instead of 0.

    Depending on how many files are in the selection they are numbered in this format
    <10 files
    file 1.ext
    file 2.ext

    <100 files
    file 01.ext
    file 02.ext
    file 99.ext

    <1000 files
    file 001.ext
    file 002.ext
    file 999.ext

    Etc, I can force them to be prefixed with 001 or 01 etc if you’d prefer though?

    Made it default to desktop.
    Find button now automatically clicks "Find Files" and "Generate New Names"

    Now has drag and drop support, you can drag entire folders or files, subdirectories are not parsed if you drag a folder.
    My program remembers folder structure so if you drag random folders from different drives etc they will all rename successfully.

    Oh it also resizes better now, not perfect but you can shrink it down pretty good and the controls only overlap when it gets really small.

    Make the most of it whilst I am feeling generous.

    Hope it saves you some time. :)

    edit: fucks sake subdirectories only work to 1 level, cbf fixing it right now.
     
  4. TERRA Operative

    TERRA Operative Member

    Joined:
    Jul 8, 2005
    Messages:
    6,925
    Location:
    Niraikanai
    You can be the father of my children, in a totally non gay way of course.....
    Making it default to 01 format until it hits <1000 would be ideal, but don't worry about it for now, It's almost 100% as it is.


    Awesome work. The appreciation is over 9000. :D
     
  5. ktmrida

    ktmrida Member

    Joined:
    May 3, 2010
    Messages:
    573
    Location:
    Australia
    Able to do a program the runs and checks to make sure a certain tcp port is oipen and running and if its not restart xyz service? or is this more a simple batch file
     
  6. tr3nton

    tr3nton Member

    Joined:
    Oct 14, 2009
    Messages:
    1,281
    For next time...

    Something that I can specify programs/scripts to run upon said network connection connecting/disconnecting

    i.e. a wireless network called WorkWireless; I go into said program, specify that connection (WorkWireless)... then i can configure programs/scripts to run on connect, disconnect, etc, so that it listens for those said events then runs if appropriate.
     
    Last edited: Jan 23, 2012
  7. Rampage101

    Rampage101 Member

    Joined:
    Jun 27, 2001
    Messages:
    2,033
    Location:
    Country NSW
    Cool that Foliage has done the renamer, but Bulk Rename Utility is pretty much perfect. Yes, there's thousands of options when you look at it, but for what you want Terra, all you do, is right click on the folder of files -> Bulk Rename Here, select the replace name and type the file name, add a numbered suffix -> win!
     
  8. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,060
    Location:
    Sleepwithyourdadelaide
    I finished that program after half a bottle of vodka last night terra, so you should be even happier that it doesn't just shout mean words at you haha

    I don't even remember writing half it now, good times. I'm back at work now so no time this week, but if I get bored next weekend I'll attempt some of the other suggestions.

    :thumbup:
     
  9. ysu

    ysu Member

    Joined:
    Sep 27, 2005
    Messages:
    1,100
    Location:
    Central Coast

    Dunno if you got a solution on that yet, if not, try downloading windows commander (free) and use its multi-rename tool (ctrl-m).
    You can very easily do this, and it is configurable to retain parts of the name or the extension if you would like to.
     
  10. samos

    samos Member

    Joined:
    Jun 29, 2001
    Messages:
    8,573
    Location:
    Melbourne
    How kind of you Roland! Heh.

    A mate and I have 500+ folders with certain files in there that need to be deleted.

    Example: I was using a tvix (media player). With a program called tvixie, it downloaded cover art etc (jpegs, and a few other files). Now that we have jumped ship to XBMC, we need to delete each jpeg + ".tvix" file from the folder so XBMC can rescrape data and not use whats in the folder as it stretches the jpeg image (long story). To do this manually is a pain in the ASS!

    To program something like this, is it a pain in the ass? There may even be something that already does this! :thumbup:
     
  11. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,060
    Location:
    Sleepwithyourdadelaide
    not planning on going out tonight so might hit up a couple of these!
     
  12. kripz

    kripz Member

    Joined:
    Sep 29, 2004
    Messages:
    2,834
    Location:
    Near Frankston
    Teracopy or Windows 8 like file copy handling for linux:D
     
  13. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,060
    Location:
    Sleepwithyourdadelaide
    I hate linux

    if I write anything I'll just send all your files to the null pipe lol
     
  14. shinzui

    shinzui Member

    Joined:
    Sep 2, 2002
    Messages:
    155
    Location:
    Brisbane
    Delete command in DOS/Windows can do this :) I'm on a mac atm so I'm not sure of the syntax, but I think it's something like:

    Open a command prompt, navigate to your media directory, eg: c:\Media\
    Then type:
    'del /s *.jpg'

    You could also try 'del /s c:\Media\*.jpg'

    Please verify the syntax of the delete command before trying - I'm not responsible if you delete all your photos or something :D
     
  15. Rezin

    Rezin Member

    Joined:
    Oct 27, 2002
    Messages:
    9,488
    You may be able to do that with Task Scheduler, if something specific is logged to Event Viewer when you connect/disconnect.
     
  16. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,060
    Location:
    Sleepwithyourdadelaide
    Yeah sorry guys really don't have the energy tonight.

    Maybe we can use this thread for other programmers to donate their skills to the community though?

    Anyone else out there feel like giving something back to the community?
     
  17. tr3nton

    tr3nton Member

    Joined:
    Oct 14, 2009
    Messages:
    1,281
    Oh, I never knew you could trigger tasks from events, in task scheduler. That's cool.

    Took a quick look around, couldn't see any specific network connect/disconnect events.... one page suggests its a system event, but after clearing them out, and disconnecting nothing there... more research needed.

    I did find this though: http://stackoverflow.com/questions/...twork-is-connected-and-also-when-user-logs-in
     
  18. C-BuZz

    C-BuZz Member

    Joined:
    Jan 24, 2002
    Messages:
    5,122
    Location:
    Melb, East
    AHAHA nice OSD man. I like the way it crashes with an exception at the end :thumbup: You win the internet.
     
  19. scared&profane

    scared&profane Member

    Joined:
    Sep 12, 2005
    Messages:
    312
    Don't hate too much mate, at least he is doing something worthwhile for the community.
     
  20. OP
    OP
    Foliage

    Foliage Member

    Joined:
    Jan 22, 2002
    Messages:
    32,060
    Location:
    Sleepwithyourdadelaide
    I like where I figured out what was wrong with it as well.

    You should fix it and show everyone how you aren't useless.

    LOL

    edit: here is a link to the source, it should take you all of ~5 minutes to fix the error
    http://dl.dropbox.com/u/1428435/OSDTest.rar
     

Share This Page

Advertisement: