Is there a Automatic File Organizer?

WildViper

Senior member
Feb 19, 2002
288
0
76
Hi,

I work in an network environment and need to setup a way to make life simpler for all on the network.

Currently, when we save a file(Excel for example), we have a "Shared Folder" where we save the file to..under a specific client.

So example:

Save As> Shared Folder > Lastname, Firstname Client Folder > Lastname, Firstname - File Desc - Dec 2007.xls

This typically works well, however, it would be more efficient for us to just dump all the files in Shared Folder, for example, and have a automatic program pick the files and sort them out and put them in the correct client folders.

Second question:

Is there a way in XP Pro(we all have that), to restrict where someone can save a file? For example, only allow files to be saved in Shared Folder and not anywhere else. This is cause the boss seems to save files all over (desktop, temp, my docs, new folder...and many other places). It seems he is having a hard time figuring out the XP file system.

If everytime he went to save, it would only open to that particular folder, it would be great.....from Lotus Notes, Acrobat, Word, Excel and some other prop software.

Thanx for any help.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
Originally posted by: WildViper
why the terrible rating? Jeez.....its not like I am asking how to "save a file"!

We get that from time to time in PC gaming, someone from another forum (probably console gaming) will come and give every thread and the first several pages a 0 star rating. Maybe a person from Everything Apple or *nix Software decided to pay Software for Windows a visit?


Back on topic, I do not know of a program that will do this (since everything you need is in the file name), but it should not be too difficult to write one. But, you would have to leave it running on the PC where the shared folder is located, unless you want to just run it from time to time in batches.
 

WildViper

Senior member
Feb 19, 2002
288
0
76
thanx for your reply.

You mention that it would not be "that hard" to write something up like this.....ummm, I have no clue where to even start.

I do not mind it running all the time or we can just schedule it to run everynight. The computer remains on anyways.

Can you write something like that?
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
Can you write something like that?
It would take me sometime to brush up on specific commands for these types of operations, so I would not be able to write it for you. Something like this can probably be done with a scripting language such as vbscript instead of an actual program. I am not all that familiar with it. Try searching for tutorials.

Here is a website that might help you retrieve the directory listings in vbscript:
http://www.microsoft.com/techn...nda/oct04/hey1020.mspx

Although it would be easier to find one that is already working. Worse comes to worse, you can always get someone on one of those rent a coder sites to write an application to your exact specifications.

 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
Well, I started writing one, but I no longer have time for it. Keep in mind that I am a java noob. Here is what I have done thus far if anyone wants to finish it:

package File_Organizer;
import javax.swing.JFrame;

public class Main
{
public static void main(String args[])
{
File_Organizer_GUI newGUI = new File_Organizer_GUI();
newGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
newGUI.setVisible(true);


}

}



package File_Organizer;
import javax.swing.JFileChooser;


public class File_Organizer_GUI extends javax.swing.JFrame{
private File_Organizer FO = new File_Organizer();
// Creates new form File_Organizer_GUI
public File_Organizer_GUI(){
initComponents();
}

// This method is called from within the constructor to

// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

txtFolderSelect = new javax.swing.JTextField();
cmdFolderSelect = new javax.swing.JButton();
cmdStart = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

txtFolderSelect.setEditable(false);

cmdFolderSelect.setLabel("Select Folder");
cmdFolderSelect.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdFolderSelectActionPerformed(evt);
}
});

cmdStart.setText("Start!");
cmdStart.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdStartActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(txtFolderSelect, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(cmdFolderSelect))
.addGroup(layout.createSequentialGroup()
.addGap(109, 109, 109)
.addComponent(cmdStart)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cmdFolderSelect)
.addComponent(txtFolderSelect, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdStart)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

pack();
}// </editor-fold>

private void cmdFolderSelectActionPerformed(java.awt.event.ActionEvent evt) {
JFileChooser folderSelectDialog = new JFileChooser();
folderSelectDialog.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);
int choice = folderSelectDialog.showOpenDialog(this);
if (choice != JFileChooser.CANCEL_OPTION){
FO.setDirectory(folderSelectDialog.getSelectedFile());
txtFolderSelect.setText(folderSelectDialog.getName(folderSelectDialog.getSelectedFile()));
}
}

private void cmdStartActionPerformed(java.awt.event.ActionEvent evt) {
Fo_Organize();
}

/**
* @param args the command line arguments
*/

// Variables declaration - do not modify
private javax.swing.JButton cmdFolderSelect;
private javax.swing.JButton cmdStart;
private javax.swing.JTextField txtFolderSelect;
// End of variables declaration



}





package File_Organizer;
import java.util.Vector;
import java.io.File;
import java.util.Scanner;

public class File_Organizer
{
private Vector<File> folders = new Vector<File>();
private Vector<File> files = new Vector<File>();

public void setDirectory(File location)
{
for (File tempFile: location.listFiles())
{
if (tempFile.isDirectory())
{
folders.add(tempFile);
setDirectory(tempFile);
}
else
files.add(tempFile);
}
}

public void organize()
{

if (files.size() == 0)
return;

System.out.println(files.toString());
Scanner parser;
String tempS = null, tempN;
boolean found = false;
File tempF;
for (File member: files)
{

tempN = member.getName();
parser = new Scanner(tempN);
while (parser.hasNext())
{
for (File aFolder : folders)
{
if ((aFolder.getName()) == tempS)
{
moveItem(member, aFolder);
tempS = null;
found = true;
break;
}
if (found)
break;
}
found = false;
tempS = parser.next();
}

if ((!found) && (tempS != null))
{

tempF = new File(member.getAbsolutePath());
tempF.mkdir();
moveItem(member, tempF);

}

}
}

private void moveItem(File item, File dest)
{
item.renameTo(new File(dest, item.getName()));
files.removeElement(item);
}


}
 

Fardringle

Diamond Member
Oct 23, 2000
9,200
765
126
I'm not a programmer so I can't really help with the automatic sorting of files, but the simplest way I can think of to help keep all of the files in the shared folder and not in random locations is to set Office applications to default to the shared folder where you want the files to be saved. It won't prevent people from choosing to save files anywhere else, but it will start them out in that folder on every save attempt so they don't have to manually browse to it each time. After making the following changes, Word and Excel will open the shared folder first when using the Save As option (or just "Save" with a new file that hasn't been saved yet).


In Excel 2000, click on Tools, Options, then click on the General tab. In the "Default file location:" field, type in the path or drive letter of the shared folder where you want the files to be saved. Click OK to save the change.

In Word 2000, click on Tools, Options, then click on the File Locations tab. Click on the Documents line and click the Modify button. Browse to the shared folder, then click OK. Click OK again to exit the Options window.


I don't have access to any newer versions of Office at the moment but the appropriate settings should be in similar locations for all versions of the applications.
 

WildViper

Senior member
Feb 19, 2002
288
0
76
Wow Schadenfroh...that's a lot of code you did. I am not sure what all that means...but sure is a lot of work. Thank you for that.

I have to say that I have been looking and the thing I found was this software: http://www.idealsorter.com/ . It is for music, but seems to handle other stuff well. I am using the trial version but seems a bit complex to figure out. Support was great though. one email and a reply right away.

Anyways, I will post my experience with it later here.

As for now, my quest continues for an easier way.

Will check out cleandeskorganizer.
 

LittleNemoNES

Diamond Member
Oct 7, 2005
4,142
0
0
Originally posted by: WildViper
Hi,

I work in an network environment and need to setup a way to make life simpler for all on the network.

Currently, when we save a file(Excel for example), we have a "Shared Folder" where we save the file to..under a specific client.

So example:

Save As> Shared Folder > Lastname, Firstname Client Folder > Lastname, Firstname - File Desc - Dec 2007.xls

This typically works well, however, it would be more efficient for us to just dump all the files in Shared Folder, for example, and have a automatic program pick the files and sort them out and put them in the correct client folders.

Second question:

Is there a way in XP Pro(we all have that), to restrict where someone can save a file? For example, only allow files to be saved in Shared Folder and not anywhere else. This is cause the boss seems to save files all over (desktop, temp, my docs, new folder...and many other places). It seems he is having a hard time figuring out the XP file system.

If everytime he went to save, it would only open to that particular folder, it would be great.....from Lotus Notes, Acrobat, Word, Excel and some other prop software.

Thanx for any help.

Dude, I am an IT noob and started working @ a clinic where we have an autofile system. My users email their files to certain addresses depending on the type of file. Say they have a Scan of someone's retina: They name their file with patient number, date of service, procedure classification (ex: 5800-20071223-6-55) they right click and send to email autofile_doctors.

This gets sent to a document queue that places the files in the correct folder for viewing on our EMR system.

If I have some time I may get around to giving you some info on how it works but for now all I care about is that it DOES work :D
BTW, you can also try using Sharepoint.
 

WildViper

Senior member
Feb 19, 2002
288
0
76
what's the name of that system? It sounds like it was probably a custom software. I do like Hazel though...dammit....we are not on a Mac!
 

LittleNemoNES

Diamond Member
Oct 7, 2005
4,142
0
0
Originally posted by: WildViper
what's the name of that system? It sounds like it was probably a custom software. I do like Hazel though...dammit....we are not on a Mac!

I think it's custom. We have a programmer who looks into it. Good luck, though :p
 

EvanAdams

Senior member
Nov 7, 2003
844
0
0
Originally posted by: gersson
Originally posted by: WildViper
BTW, you can also try using Sharepoint.

Yea that is the answer. I had same problem and am now implementing sharepoint for us and it works great! + just basic sharepoint services supports this... no special sharepoint designer stuff is needed for basic file tracking.

Problem is... you start digging into it and boy is it for the IT pros not lowley normal folk. It makes me want to hire a consultant but then I realize how little money we have for such things... which makes me google ... which makes me want to hire a consultant ... arg. ... off to buy a book.