Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,113 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,763 people online right now. Registration is fast and FREE... Join Now!




file deleter

 
Reply to this topicStart new topic

file deleter

musya
15 May, 2007 - 05:03 PM
Post #1

D.I.C Regular
Group Icon

Joined: 25 Apr, 2007
Posts: 291



Thanked: 1 times
Dream Kudos: 50
My Contributions
Hello everyone,

I want to make a program that reads in from a .txt file a list of file names and deletes fiiles from a directory with those names.

so i.e i do a lot of photo work, and people choose what phots they want, and its a lot of work deleting them by hand so when i get the email of the list of the ones that they dont want it will delete the ones they dont want from the dir.

so the .txt has names like.
IMG_7090.jpg
IMG_7091.jpg
etc..

and the program will delete IMG_7090.jpg and IMG_7091.jpg from a directory that the user specifies, with those files.

I am still learning C++ i have gotten to inheritance and polymorphism, but i have never covered fstream or anything like that yet, can someone please point me in the correct/right direction for doing this?

Thank You!
Musya
User is offlineProfile CardPM
+Quote Post

Xing
RE: File Deleter
15 May, 2007 - 08:45 PM
Post #2

D.I.C Addict
Group Icon

Joined: 22 Jul, 2006
Posts: 723



Thanked: 2 times
Dream Kudos: 1575
My Contributions
You need to give us more information like what OS you are using, compiler to be used, any portability issues?,allowed to use external libraries etc.
User is offlineProfile CardPM
+Quote Post

musya
RE: File Deleter
15 May, 2007 - 09:58 PM
Post #3

D.I.C Regular
Group Icon

Joined: 25 Apr, 2007
Posts: 291



Thanked: 1 times
Dream Kudos: 50
My Contributions
QUOTE(Xing @ 15 May, 2007 - 09:45 PM) *

You need to give us more information like what OS you are using, compiler to be used, any portability issues?,allowed to use external libraries etc.


I am open to any libraries, i have stlport5 and im running ubuntu/windows, but this app will need to work for windows. compiler is visual express unless i make it in ubuntu then gcc, but ill probably be using Visual Express on this one. no portability issues i would assume, i would just build the project to an executable and then run it, or unless i make a gui for it. hope this helps you to help me?
User is offlineProfile CardPM
+Quote Post

musya
RE: File Deleter
16 May, 2007 - 05:40 PM
Post #4

D.I.C Regular
Group Icon

Joined: 25 Apr, 2007
Posts: 291



Thanked: 1 times
Dream Kudos: 50
My Contributions
anyone can help me?
User is offlineProfile CardPM
+Quote Post

enpey
RE: File Deleter
16 May, 2007 - 07:04 PM
Post #5

D.I.C Head
**

Joined: 2 May, 2007
Posts: 59



Thanked: 1 times
My Contributions
Musya,

You could try looking at this site about opening the file : http://computer.howstuffworks.com/c19.htm

And on deleting files try this forum post : http://cboard.cprogramming.com/showthread.php?t=1001


These were easy enough to find, just google what you are looking for..

Nathan
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 09:45PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month