Thread: Dirctory Listing

  1. #1
    Patent Pending GSLR's Avatar
    Join Date
    Sep 2001
    Posts
    134

    Question Dirctory Listing

    Hi

    okey doke here we go.
    I have this directory at work that consists of about 5000 autocad drawings, the problem is that about 4 people made these drawings over a period of time and of course when you get different users u get different ways of saving files ie: I like to Capitalise the first letter, others dont care ,still its personal preferance.

    I would like to create a program that renames each drawing keeping its original nameand ext but capitalising and modifying to a set way.

    The problem is I havent a clue as to where to begin to call the actual name of the drawing into the prog so as to change it.

    At the moment I dont have any code as I dont really know where to start!

    Thanx any help would be good

    Q
    And To All Those Opposed, WELL !!!
    >Deleted< " Looks like a serial no."

  2. #2
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    How about providing more details like what OS, Compiler you are using?

  3. #3
    Patent Pending GSLR's Avatar
    Join Date
    Sep 2001
    Posts
    134

    os

    Damn forgot to mention

    Win 98
    Dev C++ compiler
    Programming in c

    Thanx
    And To All Those Opposed, WELL !!!
    >Deleted< " Looks like a serial no."

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    I would copy them to a temp folder with a new file name. (if you have the space)

    If you use the WIN32 API you can call FindFirstFile(), FindNextFile() with the original folder, wild cards and the extension.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  5. #5
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    I would go about this way: Pick up each file from the directory;
    1.) Rename it to some xxx
    2.) Rename it to the desired filename.
    If (1) can be ignored and (2) applied directly, would be great. I don't know if Win98 allows you to do this

  6. #6
    Patent Pending GSLR's Avatar
    Join Date
    Sep 2001
    Posts
    134

    More descriptive

    Ok heres a little explination

    I have a folder named Drawings

    within this folder I have various drawing files
    such as

    Maj9Ls34
    maj12ls12
    maJ01LS02

    etc....

    Now I create a program and run it, it opens the folder reads in the first file name , check for capitals and lowercase and modifies accordingly. Then it continues to the next file name etc...

    When the program has finished running the folder will contain the same files like this

    Maj9ls34
    Maj12ls12
    Maj01ls02

    etc.. ( Note the caps and lowercase have been changed)

    I program in c using devc++

    Thanx
    And To All Those Opposed, WELL !!!
    >Deleted< " Looks like a serial no."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Improvements on Recursive Directory Listing
    By laney69er in forum C Programming
    Replies: 1
    Last Post: 03-15-2006, 01:39 AM
  2. Listing all hooks?
    By kryptkat in forum Windows Programming
    Replies: 4
    Last Post: 11-17-2005, 04:55 PM
  3. Folder listing
    By UnclePunker in forum Windows Programming
    Replies: 3
    Last Post: 01-27-2005, 05:08 PM
  4. listing files in directories portably
    By ab384 in forum C Programming
    Replies: 2
    Last Post: 11-03-2004, 10:50 AM
  5. !! DOS UNIcomal Listing !!
    By Stupider Like A in forum C++ Programming
    Replies: 3
    Last Post: 10-02-2002, 12:43 PM