Forumet - Göm dina filer enkelt med mitt nya program FOMD!

Göm dina filer enkelt med mitt nya program FOMD!

1968 0 91
HEJ ALLA UM:ARE!

FOMD: http://jaag91.webs.com/FOMD/index.htm

Nu gör jag release på mitt lilla roliga program jag gjorde idag på Java lektionen medan alla andra amatörer satt å knåpa med nån mattematisk funktion.

Programmet fungerar så att du kan dölja dina filer och mappar för föräldrar, syskon eller kompisar.

Dom går att hitta med det blir svårt för den normala dator användaren. Man måste även veta att det finns filer som är dolda innan man börjar leta... Och nej det är inte bara att visa dolda filer och mappar, lite svårare än så är det att hitta dom [no-no]


Jag kallar den för FOMD (Fil Och Mapp Döljaren)

Du döper helt enkelt det du vill dölja till nått klurigt och lägger det på T.ex C:\ sen när du ska dölja skriver du helt enkelt C:
amnetPåMappen
i rutan för sökväg och klickar på dölj, när du ska visa filen igen gör du samma sak men trycker på Visa [bigcheers]

Testa gärna och jag tar gärna del av alla error eller andra meddelanden ni får [smile]

Ladda ner från min um-avdelning på frewebs(ingen installation eller sådant tjafs behövs): http://jaag91.webs.com/FOMD/index.htm

Spana också in:

massgrav:

Pastebin'a källkoden först.


Ok garva inte [no-no]



import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.logging.Level;
import java.util.logging.Logger;




public class FileDirHider extends javax.swing.JFrame {

public FileDirHider() {
initComponents();
}

@SuppressWarnings("unchecked")

private void initComponents() {

jFrame1 = new javax.swing.JFrame();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
menuBar = new javax.swing.JMenuBar();
fileMenu = new javax.swing.JMenu();
exitMenuItem = new javax.swing.JMenuItem();
helpMenu = new javax.swing.JMenu();
aboutMenuItem = new javax.swing.JMenuItem();

jFrame1.setTitle("Hjälp");
jFrame1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel3.setText("Hjälp för Fil Och Mapp Döljaren");

jLabel4.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel4.setText("Fil och mapp döljaren kan dölja filer och mappar så att det");

jLabel5.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel5.setText("blir svårt att komma åt dem för en amatör, det räcker inte");

jLabel6.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel6.setText("med att visa dolda filer och mappar.");

jLabel7.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel7.setText("Du skriver helt enkelt in sökvägen till filen eller mappen du");

jLabel8.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel8.setText("Vill hantera och klickar på Visa eller Dölj. Det enklaste sättet");

jLabel9.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel9.setText("är att lägga en mapp med krångligt namn direkt i \"C:\\\" och");

jLabel10.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel10.setText("sedan dölja den. Blir inte så mycket att skriva då. Kom dock");

jLabel11.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel11.setText("ihåg att du måste komma ihåg namnet på filen! Det fungerar");

jLabel12.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel12.setText("som ett lösenord.");

jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel13.setText("Detta program är skapat av Felix / FsX.");

jLabel14.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel14.setText(" Vid frågor: Fibbe_15@hotmail.com");

javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
jFrame1.getContentPane().setLayout(jFrame1Layout);
jFrame1Layout.setHorizontalGroup(
jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jFrame1Layout.createSequentialGroup()
.addGap(28, 28, 28)
.addGroup(jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN​G)
.addComponent(jLabel14, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel9)
.addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
.addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE))
.addContainerGap())
);
jFrame1Layout.setVerticalGroup(
jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jFrame1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6)
.addGap(18, 18, 18)
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel12)
.addGap(32, 32, 32)
.addComponent(jLabel13)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)
.addComponent(jLabel14)
.addContainerGap())
);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("FOMD - Fil Och Mapp Döljaren");

jTextField1.setText("C:\\");
jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});

jButton1.setText("Visa");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jButton2.setText("Dölj");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel1.setForeground(new java.awt.Color(240, 0, 0));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setText("Inga error");

jLabel2.setText("Ange filen eller mappen du vill dölja/visa:");

fileMenu.setText("Arkiv");

exitMenuItem.setText("Exit");
exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItemActionPerformed(evt);
}
});
fileMenu.add(exitMenuItem);

menuBar.add(fileMenu);

helpMenu.setText("Hjälp");

aboutMenuItem.setText("Hjälp");
aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
aboutMenuItemActionPerformed(evt);
}
});
helpMenu.add(aboutMenuItem);

menuBar.add(helpMenu);

setJMenuBar(menuBar);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2))
.addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(88, 88, 88))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
.addContainerGap())))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(73, 73, 73)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton2)
.addComponent(jButton1))
.addGap(108, 108, 108)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
.addGap(20, 20, 20))
);

pack();
}

private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
boolean gone = false;
String fil = new String("");
if(new File(jTextField1.getText()).exists())
{
jLabel1.setText("");
try {
fil = "C:\\tempDold.bat";
FileWriter fw = new FileWriter(fil);
BufferedWriter bw = new BufferedWriter(fw);
PrintWriter utFil = new PrintWriter(bw);

utFil.println("attrib \""+jTextField1.getText()+"\" -s -h");


utFil.close();

Process p = Runtime.getRuntime().exec("C:\\tempDold.bat");

p.waitFor();


gone = new File(fil).delete();

} catch (IOException ex) {

}
catch (InterruptedException ex) {
Logger.getLogger(FileDirHider.class.getName()).log(Level.SEVERE, null, ex);
}
}
else
{
jLabel1.setText("FEL: Mappen/Filen existerar inte");
}
if(gone)
{
jLabel1.setText("Notis: Delay när temporär fil skulle raderas");
}
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
if(new File(jTextField1.getText()).exists())
{
jLabel1.setText("");
try {
if(!jTextField1.getText().equalsIgnoreCase("C:\\"))
{
String fil = "C:\\tempDold.bat";
FileWriter fw = new FileWriter(fil);
BufferedWriter bw = new BufferedWriter(fw);
PrintWriter utFil = new PrintWriter(bw);

utFil.println("attrib \""+jTextField1.getText()+"\" +s +h");


utFil.close();

Process p = Runtime.getRuntime().exec("C:\\tempDold.bat");

p.waitFor();

boolean gone = new File(fil).delete();
if(gone)
{
jLabel1.setText("Notis: Delay när temporär fil skulle raderas");
}
}
else
{
jLabel1.setText("ERROR: C:\\ kan inte döljas av säkerhetsskäl");
}
} catch (IOException ex) {

}catch (InterruptedException ex) {
Logger.getLogger(FileDirHider.class.getName()).log(Level.SEVERE, null, ex);
}
}
else
{
jLabel1.setText("FEL: Mappen/Filen existerar inte");
}
}

private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {

}

private void aboutMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
jFrame1.show();
jFrame1.setSize(400,400);
}


public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new FileDirHider().setVisible(true);
}
});
}

private javax.swing.JMenuItem aboutMenuItem;
private javax.swing.JMenuItem exitMenuItem;
private javax.swing.JMenu fileMenu;
private javax.swing.JMenu helpMenu;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JFrame jFrame1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JTextField jTextField1;
private javax.swing.JMenuBar menuBar;


}

A-Squared
Found nothing
AntiVir
Found nothing
ArcaVir
Found nothing
Avast
Found nothing
AVG Antivirus
Found nothing
BitDefender
Found nothing
ClamAV
Found nothing
CPsecure
Found nothing
Dr.Web
Found nothing
F-Prot Antivirus
Found nothing
F-Secure Anti-Virus
Found nothing
Ikarus
Found nothing
Kaspersky Anti-Virus
Found nothing
NOD32
Found nothing
Norman Virus Control
Found nothing
Panda Antivirus
Found nothing
Quick Heal
Found nothing
Sophos Antivirus
Found nothing
VirusBuster
Found nothing
VBA32
Found nothing
massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


massgrav:

Found nothing


Klart dom inte gjorde [zzz]