I please need help to delet writing protection with batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
StevenK
Posts: 3
Joined: 07 Mar 2013 13:37

I please need help to delet writing protection with batch

#1 Post by StevenK » 07 Mar 2013 14:02

hello my friends,

I need to put the texts of two files into one, which is not my biggest problem. I have made two paragraphs in the files the second one is used as a normal signiture. But to put the two files into one with the merging program, I need to delet the writing protection with a batch file to merge it then. so far I have this:

for %%+r in C:\Users\Sr. Test\Desktop\Berichts/Pflegedokumentation geschützt.doc do %%-r
start "" "C:\Program Files (x86)\MS Word Merge Tool\Word merge.exe"

As you can see its a doc-file and saidly batch dont change their attribute from +r in -r.

I cant change it before because then people who make those texts could put an other name under it or forgett about putting down their signitur, and I dont want them to have their change.
I would be so glad if anybody could help, because it is a part of a project and I would love it so much if it is going to work and me getting a good mark.

Steven

mfm4aa
Posts: 70
Joined: 13 Feb 2013 14:02
Location: Europe

Re: I please need help to delet writing protection with batc

#2 Post by mfm4aa » 07 Mar 2013 14:51

You should use the "attrib" command for this:

Code: Select all

attrib -r "C:\Users\Sr. Test\Desktop\Berichts/Pflegedokumentation geschützt.doc"


Type "attrib /?" for help.

StevenK
Posts: 3
Joined: 07 Mar 2013 13:37

Re: I please need help to delet writing protection with batc

#3 Post by StevenK » 08 Mar 2013 01:55

hello mfm4aa


thank you for your quick respond. It saidly does not work, because the writing protection is a part of the file. So I think its a MS Office-right so I cant change it with a batch file.

So I have to put in a signature read out of the Active Directory on a special place into the file. But I dont know its possible in a normal word file. I have read about putting a signature into an e-mail, but on a normal word file ?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: I please need help to delet writing protection with batc

#4 Post by foxidrive » 08 Mar 2013 05:09

What you are describing is not a batch file function.

If you can find an executable file that will remove the editing lock on the file, and if can work from the command line, then that could be used.

StevenK
Posts: 3
Joined: 07 Mar 2013 13:37

Re: I please need help to delet writing protection with batc

#5 Post by StevenK » 10 Mar 2013 09:12

yes, thats what I was thinking.


Thank you very much for your help :)

Post Reply