hello there...is there a way to check if the file you get is the file you really want...like for example, you want an .iso file, if yo placed any file like .txt, the system will exit...but if you placed a file with .iso extension, it will continue to run...thanks...

Recommended Answers

All 2 Replies

You look at the extension of the filename and see what it is. Using programming. And then use if statements to control your behavior based on the extension.

It really doesn't matter what the extension is, you still have to validate its content.

You malicious (or curious) user might just decide to try to rename foo.jpg to foo.iso just to see what happens.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.