Jump to content

Mike12

Members
  • Posts

    6
  • Joined

  • Last visited

Reputation

0 Neutral

About Mike12

Personal Information

  • Occupation
    IT officer
  • Location
    Detroit
  1. Hi steve, I am not copying NTFS permissions to FAT. The machine on which the batch file is executed is windows 7 64-bit OS. The machine to which the backup files & folders are copied which is "Sbptfs" is a Windows server 2008. Both machines are on the network. To windows 7 i login with my credentials and i also have the rights as an domain administrator as well. I run the backup script on windows 7 machine loged in as myself inorder to copy my desktop, documents & favorites to the destination machine "sbptfs". The script i am using copies all the three folders with contents to the destination machine and it also pulls my name and creates a folder with my name on the destination machine and put all the three folders inside it. Here when i right cilck on any of the three folder or the parent folder with my name and go to properties and then security tab there are 4 accounts, but there is no account with my name. I want to see my account and the domain admin account here only and not other accounts which i mentioned earlier "Users (SBPTFS\Users). There should be an account with my name instead of Users. Also the Domain Admin accout should also be there. Any help would be highly appreciated. Mike.
  2. I updated the code with this line, but now the contents of the folder are not copied to the destination machine. Also, permissions are the same, no change. If you can help me in writing a simple code for a batch file which i can use on windows 7 inordr to backup my files and folders to a drive on the network. My code i don't understand it does everthing except does not update the permissions. I have been working on this for the last 4 days, now its driving me crazy. Thanks, Mike
  3. At the target computer when i access the rights the user who performed the backup doesn't have the proper rights all boxes are greyed out. The user name is not present with the domain admins. There are only Users (SBPTFS\Users). There is no account with my name.
  4. Hi Steve, Yes, i loose the permissions when the files or folder are backed up to the target computer. Help me out how to have the same permissions once i backup the folders & files from the source machine to the target machine. I have tried but can't fix the code for the permission only. Otherwise the code works fine and it backs up (desktop, documents favorites) to 'Spbtfs' which is the target computer on the network. Mike.
  5. Hi, I am trying to execute this script but its not executed on my machine windows 7 64-bit. I am confused for a couple of code lines you mentioned. :: variables set DisplayName= set drive= I am not sure if we have defined set drive=z:\%displayname%, then wgy are we mentioning again. My script works fine it backs up to the target computer "sbptfs" and creates a folder 'share$' and backs all the three folders which i want. The only broblem i am facing is the permissions. I am using following two lines of codes for the permissions. icacls * /T /C /Grant %Username%:F icacls * /T /C /Grant "Domain Admins":F Which does not define the proper rights. I need help to modify only the permission section the rest my script works perfect. I would really appreciate if someone can help me modify the permission section. Thanks for the script and i look forward to your reply. Mike.
  6. I am using the below mentioned backup script inorder to backup folders to a drive on the network. I can't set the permissions for a particular user, i want to give full control to the Domain Admin & this particular user which is performing this bakup. I don't want any other acounts to show up when the backup is completed and i go to the remote computer "sbptfs" to see the only these two accounts under the folders properties (security) tab. I have alos tried to use the :r switch but idoesn't work and no permissions are modified at the destination machine. I have been working for the last 2 days and read differet articles, but no luck Any propmt response will be really appreciated. i need immediate help. thanks, Mike. @echo OFF net use z: \\sbptfs\share$ for /f "tokens=2*" %%a in ('net user "%Username%" /domain ^| find /i "Full Name"') do set DisplayName=%%b ECHO .....................Backing up %DisplayName% :: variables set drive=z:\%DisplayName% set backupcmd=xcopy /s /c /d /e /h /i /r /y icacls * /T /C /Grant %Username%:F icacls * /T /C /Grant "Domain Admins":F ECHO .....................Backing up Desktop... %backupcmd% "%USERPROFILE%\Desktop" "%drive%\Desktop" ECHO .....................Backing up Favorites... %backupcmd% "%USERPROFILE%\Favorites" "%drive%\Favorites" ECHO .....................Backing up Documents... %backupcmd% "%USERPROFILE%\Documents" "%drive%\Documents" net use z: /delete pause
×
×
  • Create New...