View Full Version : PC dual save possible?
BLiZZaRD
02-15-2007, 12:31 AM
At work I have control of 11 different computers. Most are running Win XP and the others Win 2k. My problem is that we have a certain folder on a shared directory where all files (reports, audits, etc) are to be saved so the Supervisor can go in and verify them before they are sent out.
Problem is, most of the normal users know as much about computers as I do a Russian Space Shuttle. They simply choose the "save as.." option and end up saving to their documents folder, or to their desktop.
I was wondering if there was something I could do that would recognize file types, either generic (i.e. *.doc, *.txt) or even specific (i.e. filename.doc) and when saved, it would save where ever they save it to by default, but would ALSO save to the specified folder in the shared directory.
Please tell me this is possible. I would rather go and add what ever fix I needed to to each computer than try to retrain 11 persons every 2 weeks (that is what it would take)
Thanks in advance!
BLiZZ
djr33
02-15-2007, 01:05 AM
Hmm... I'd say it's kinda invading their privacy. Certainly warn them. But... it is work, I guess...
You'd need to reprogram word.
The other option is that they run a script or it runs automatically that searches that directory and saves them to a network drive. Seems simple enough to even make use of a batch file. Might be a bit more complex than that though...
thetestingsite
02-15-2007, 02:47 AM
I'm pretty sure you could create a batch file to do this, and add it to the scheduled tasks list to run every x minutes on every machine. The question is, how would you do the batch file. I have been trying to figure something like this out for a while without any luck. I think John knows a bit about it, but no sure how much he knows. Perhaps he could shed some light on the situation.
djr33
02-15-2007, 05:16 AM
Batch isn't all that hard.
Start>Run>"cmd">"help">[Enter]
And look at the list of possible commands. copy, among others, can accomplish this with ease, I think.
The problem I see is getting it to a network drive. If it is just a named drive and no connecting needed, then there should be no issue. But if it's a more complex system, that might cause some trouble.
Also, I still have mixed feelings about this. You should be very careful with your invasion of privacy. No matter where I'm working, I'll have some confidential documents, or at least things I wouldn't want spread around. What if an employee backs up a copy of an email that is negative toward a fellow employee? Just seems like a mess.
I think it would be a lot easier to tell people how to save to the network drive, or how to save to a "special" outbox folder in my documents, if you're sure you'd want to do this.
tech_support
02-15-2007, 06:22 AM
REM The Share folder
SET SHAREFOLDER=C:\
REM Documents
copy "%userprofile%\Desktop\*.doc" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.doc" %SHAREFOLDER%
REM Word 2007 Documents
copy "%userprofile%\Desktop\*.doc" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.doc" %SHAREFOLDER%
REM *.txt Documents
copy "%userprofile%\Desktop\*.txt" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.txt" %SHAREFOLDER%
For the Batch file.
BLiZZaRD
02-15-2007, 06:59 AM
Yes the issue of privacy has come up, however, these are work computers, not personal computers, and they have all been made aware of that.
Looking at the batch file code above, it seems this is a non issue though... The forms that the employees will be using and saving are in one specific folder on the shared drive, which by the way, is from a new partition on one of the computers, given a new drive letter (in this case m:\ ) and is shared over the network.
Sooo.. guessing from the code example above I can choose to only save files from that specific folder in the dual format?
I appreciate all the help with this one guys :D
Now, if I can be so stupid as to ask... I make the above (with my settings) and save as whatever.bat then I put it on each of the computers and then what? I haven't had to do anything like this before so I am learning as we go here.
BLiZZaRD
02-16-2007, 04:46 PM
No other help/ideas how to properly implement this .bat file?
thetestingsite
02-16-2007, 04:55 PM
Run a scheduled task to run that file. We use batch files to do or backups for some of our servers, and we set it as a scheduled task. Works good too.
BLiZZaRD
02-16-2007, 04:57 PM
Okay, so I would just place the file some where on the computer, then make a task to run it every X days or X hours or something?
Wow, I thought it would be a little harder than that....
Is there a way to do this without the task scheduler, say to run the file every time Word runs a "save as..." option or something?
....how else can I make this more complicated? ROTF
thetestingsite
02-16-2007, 05:02 PM
Not sure how you would do something like that without actually "rewriting" Word. Is that complicated enough for you ;)
But on a serious note; I would have to recommend the task scheduler, or you could just tell your co-workers to run that batch file after they save a document.
Hope this helps.
BLiZZaRD
02-16-2007, 05:09 PM
It does, and I will just use task scheduler... HOWEVER...
I just set it up on my computer and it didn't work... perhaps I did something wrong? Can you help me diagnose?
Here is my "dualsave.bat" file:
REM The Share folder
SET SHAREFOLDER=\\I-dont-know\tga shared\Agent's Folders\Private\
REM Documents
copy "%userprofile%\Desktop\*.doc" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.doc" %SHAREFOLDER%
REM Word 2007 Documents
copy "%userprofile%\Desktop\*.doc" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.doc" %SHAREFOLDER%
REM *.txt Documents
copy "%userprofile%\Desktop\*.txt" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.txt" %SHAREFOLDER%
Now I made a .txt file and saved it to my desktop. (the dualsave.bat is also on my desktop) I also made a test.doc and saved it into my documents folder.
I double clicked the dualsave.bat it ran in DOS real fast. I checked the "Private" folder on the shared drive and nothing is in there.
Now the "address" I listed as the %sharefolder% is the address of the "private" folder I got when checking properties... Some how I think this is the problem, but I don't know enough to even start... ideas?
thetestingsite
02-16-2007, 05:34 PM
Odd, the batch file worked fine for me on my computer. Check to see if the path to the shared folder is correct; and if so, make sure it has correct permissions for users to change files in that folder.
Added Later: When I go into work, I'll try it on our network to see if there may be something else causing it not to work for you.
BLiZZaRD
02-16-2007, 05:43 PM
Cool, I will check the permissions now. I appreciate the looking into while at work as well...
I will let you know if the permissions thing has something to do with it :D
BLiZZaRD
02-16-2007, 05:56 PM
Well, the option to allow changing of files was not checked, but I enabled it and it still didn't work...
Must be the network then? grrrrr
Why can't this ever be a simple fix...
<EDIT>
I just changed the %sharedfolder% to a brand new local folder on my desktop... ran it... nothing... so maybe it isn't the network, what else could I be doing wrong?
</EDIT>
The other option is to introduce a system-wide hook that checks for any data written to a file in one of those folders, and write it to the shared folder. This would be a better and possibly more efficient solution, but harder to implement. boxxertrumps has been learning the Windows API, perhaps he could have a go.
thetestingsite
02-16-2007, 05:59 PM
Why can't this ever be a simple fix...
What would be the fun of that :D
Just thinking right off the top of my head, are you calling to the shared directory properly. (IE: is the name of the computer/drive spelled correctly in the batch)?
Try moving to another machine and make a shared folder on that as well. Just some ideas.
BLiZZaRD
02-16-2007, 06:03 PM
HOLY CRAP I FIGURED IT OUT!!!
LMAO... the above is what I had...
I forgot the "" around SET SHAREDFOLDER!!!
It works now! AWESOME!!! Thank you!
BLiZZaRD
02-16-2007, 06:05 PM
The other option is to introduce a system-wide hook that checks for any data written to a file in one of those folders, and write it to the shared folder. This would be a better and possibly more efficient solution, but harder to implement. boxxertrumps has been learning the Windows API, perhaps he could have a go.
I would be interested in these options as well! Any more info about them is awesome and welcomed! :D
tech_support
02-17-2007, 12:19 AM
If you want you can add more extensions, just add:
REM *.myextensiongoeshere
copy "%userprofile%\Desktop\*.myextensiongoeshere" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.myextensiongoeshere" %SHAREFOLDER%
and a typo for Word '07 documents:
REM Word 2007 Documents
copy "%userprofile%\Desktop\*.docx" %SHAREFOLDER%
copy "%userprofile%\My Documents\*.docx" %SHAREFOLDER%
BLiZZaRD
02-17-2007, 06:01 PM
Thanks! It works great now!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.