Forum start - Register
Name Password Forgot your password?

Forum start > pc > software > Those Pesky Read-Only Files
Author
Thread
JDOG
Member


 

Location: 
Registered: 8/7/2006    Warnings: 0
Those Pesky Read-Only Files
Alright guys, here's the situation... I am trying to out do myself at Oakwood and pretty much show off some of my skills for a promotion. I had an idea that I am working on just for "fun", which means lots of hours outside of work not getting paid lol. But the user's for whatever reason have access to write files to the C drive if they are ignorantly cunning enough to save them there (I know, they shouldn't even have permissions to the local drives but that is not my area :] ) Each user has a network drive to save their files to, which they are supposed to be doing. I want to create a program that starts at log in and goes through their local files and copies them to their network drive, that way, when their computer crashes like they always do we will have less angry doctors and nurses yelling at us when they were the ones dumb enough to save their files to their local drives to begin with, grant it, 99.9% of them know no better to begin with. All this to say, I am using VB and my line is
My.Computer.FileSystem.CopyDirectory(CopyFrom, CopyTo, True)
I am running into an error that is generated by the fact that the MyDocuments folder is read-only. I have been looking for how to set these folders to not read-only or to just overlook that simple attribute of read-only, any ideas!?!?
__________________
JDW
jdog44@gmail.com
3/13/2012 23:22 Link - Ip: Logged - Quote:
byerspc
Admin
avataren

 

Location: South Bend, IN
Registered: 4/14/2006      Warnings: 0
__________________
byerspc
byerspc@gmail.com
3/14/2012 11:41 Link - Ip: Logged - Quote:
byerspc
Admin
avataren

 

Location: South Bend, IN
Registered: 4/14/2006      Warnings: 0
hmm I think there is a way to make their my documents actually go to their network drive ...seems like we did this at ICB.

What command are you using to actually do the copy?

I think xCopy can ignore attributes etc.
__________________
byerspc
byerspc@gmail.com
3/14/2012 11:44 Link - Ip: Logged - Quote:
JDOG
Member


 

Location: 
Registered: 8/7/2006      Warnings: 0
I was using the My.Computer.FileSystem etc and it was working just fine if it wasn't a MyDocuments. I need some more functionality than what I can get out of a batch file; well, at least what I know of batch files lol. I could make a program that made a batch file, I knew I had that in my back pocket but was trying to avoid it. It seems like an unnecessary step but it may be easier than messing around with folder permissions.
__________________
JDW
jdog44@gmail.com
3/14/2012 14:10 Link - Ip: Logged - Quote:
byerspc
Admin
avataren

 

Location: South Bend, IN
Registered: 4/14/2006      Warnings: 0
You can run batch file commands in your code too. Back in the day there was a power tool by Microsoft called synctoy that would kind of do what you are talking about. There is also a reg hack to redirect my documents to a shared drive (that is what we did at ic)
__________________
byerspc
byerspc@gmail.com
3/16/2012 16:37 Link - Ip: Logged - Quote:
JDOG
Member


 

Location: 
Registered: 8/7/2006      Warnings: 0
What do you mean by a reg hack? They do direct the user's to the network folder at first but they are still able to get their way back to the local drive as well. That would be something I would have to bring up if I do manage to get this promotion
__________________
JDW
jdog44@gmail.com
3/18/2012 21:50 Link - Ip: Logged - Quote:
byerspc
Admin
avataren

 

Location: South Bend, IN
Registered: 4/14/2006      Warnings: 0
I think with Group Policy you can pretty much hide the C: drive too but that may be more bother than it is worth...the sync app may be less of a headache.
__________________
byerspc
byerspc@gmail.com
3/19/2012 08:25 Link - Ip: Logged - Quote:
Forum start > pc > software > Those Pesky Read-Only Files

Quick reply
You need to login before you can post.


Powered by ASPBB v0.5.2
© 2004-2006 ASPBB Developers team