Jump to content

deathmage

Member
  • Posts

    7
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About deathmage

Profile Information

  • OS
    Server 2008 x64

deathmage's Achievements

0

Reputation

  1. Hello, I'm curious if there is a batch file that can be made to move the contents that are setup like this.... I'm having to redo a TS cluster and I'd like to make a batch file script that can be executed that moves the contents of say 'jsmith's local desktop profile @ \\NGTTS1\users\jsmith to a centralized folder on our roaming desktop profile server that saves all of the files for the desktops @ \\NGTFS1\users\jsmith. The problem I have is no matter what I tell users to save there files to our Y drive that is a folder that is synced across all 6 of our TS servers, users still store files on there desktops, so as you can imagine if one day they are on one server, then next day they could be on another and there files aren't the same.... hence the reason why I want to move all there files to the centralized server so when I redo the profiles from scratch on the TS server in the farm they suck files from the core server and have all of the files they are used to having.... Now I know I can do this with a MOVE command I've just never done one to this exact. Hopefully someone knows the command to move all the contents of one folder on one server to the folder on a different server. I've already got the bulk of the coding done of the .bat script I just don't know this move command: would it be this: move \\NGTTS1\users\jsmith *.* \\NGTFS1\users\jsmith any help would be appreciated, I'm sure this is a easy command to do! Also what I'd like to do if force the copy of the files even if the some of the files are duplicates and just copy over them or skip them, just not sure how to do this.... This is what I got so far for coding: @echo off color 0A title Moving Local Profile folder to Centralized Profile Folder on Core Server. :start echo Welcome, %USERNAME% echo What would you like to do? echo. echo 1. Moving Local Profile folder to Centralized Profile Folder on Core Server echo. echo 0. Quit echo. set /p choice="Enter your choice: " if "%choice%"=="1" goto Move-user-profiles echo. if "%choice%"=="0" exit echo Invalid choice: %choice% echo. pause cls goto start :Move-user-profiles echo. set /p profile="Enter user profile: " move "\\NGTTS1\users\%profile%" *.* "\\NGTFS1\users\%profile%" echo moving files from local profile folder to FS1 profile server, stand-by... echo. goto cancel-special :cancel-special set /p cancel="Type cancel to stop action: " if not "%cancel%"=="cancel" exit cls echo Action is cancelled. echo. pause exit
  2. ahhh this is so much better, speeds up this process so much better. Thanks for the quick help, very much apprecaited.
  3. you are awesome; that is exactly what I was looking for! BTW - do you have a Batch command bible of sorts you know of. I'd like to make a few batch command for automation and it would be sooooo much easier for me. I'm so willing to learn! now going to see if this works, but now I have a format to work with here. now my question, is how do I execute the modified field?
  4. Sorry I see my wording was a bit lax's :-P basically this command: psexec -s "icacls" "d:\profiles\username.DOMAIN.V2" /grant administrators:F /t is inputted each time into command prompt; what I'm seeking to do is to change this field at the end of "d:\profiles\" to allow me to do something like this in a input field in the batch program ie like this: Please input username folder : jsmith.DOMAIN.V2 then I'd press return and the code above would execute with the command looking like this..... psexec -s "icacls" "d:\profiles\jsmith.DOMAIN.V2" /grant administrators:F /t does this make sense and is this due-able? I'm thinking like a replace command would work, just not sure how to input it.... something like replace "username.domain.v2" with input line then execute psexec -s "icacls" "d:\profiles\username.DOMAIN.V2" /grant administrators:F /t where "username.domain.v2" changes and equals input field....
  5. Hello, I'm trying to make a batch file that will allow me to fill in a field with a user name for a roaming profile ownership command. Having to retype this command over and over again is tedious. So I created the following code below; but I'm clueless as to how to change this one field within the command in this batch file for each user. I have some past expereince with C++ and COBOL so I understand programming logic but batch coding is just a matter of understanding the commands. here is the command: psexec -s "icacls" "d:\profiles\username.DOMAIN.V2" /grant administrators:F /t the name is bold is the field i'd like to change on each execution of this batch program so I can breeze thru all 550 of these roaming profile recreations since we have a corrupt print driver that f***ed all of the profiles on 6 TS servers including the roaming profile which is now corrupt on all of them. Takes about 25 minutes per user and 550 users ya do the math, lol!!!! here is my code so far, any help would be appreciated. @echo offcolor 0Atitle Corrupt Roaming Profile Change.:startecho Welcome, %USERNAME%echo What would you like to do?echo.echo 1. Click here for a Nude photo!echo 2. Take Ownership of User's Roaming Profileecho. echo 0. Quitecho.set /p choice="Enter your choice: "if "%choice%"=="1" goto pervertif "%choice%"=="2" goto ownership-changeecho.if "%choice%"=="0" exitecho Invalid choice: %choice%echo.pauseclsgoto start:pervertclsecho your a pervert, you know it, you clicked on this option shame on you!!!echo.goto cancel-special:ownership-changeecho.echo.psexec -s "icacls" "d:\profiles\username.DOMAIN.V2" /grant administrators:F /t echo roaming profile forced ownership change in progress...echo.:cancel-specialset /p cancel="Type cancel to stop action: "if not "%cancel%"=="cancel" exitclsecho Action is cancelled.echo.pauseexit ---------------------------- this is what I'm trying to do. Basically the command below is used to force ownership of the roaming profile since it's corrupt. What I'm hoping is possible is to make a input field that allows me to change the last part of the field below "username.domain.v2" on each execution of the batch file so I can breeze thru the recreations. :ownership-changeecho.echo.psexec -s "icacls" "d:\profiles\username.DOMAIN.V2" /grant administrators:F /techo roaming profile forced ownership change in progress...echo. I'm trying to figure out a way to do like a command like this, just don't know the command if ."d:\profile\" == "d:\profile\" input field is require for last clause I just don't know how to script it into the code to input it into the batch field above... Any help would be appreciated, it's just this part i'm unsure how to code, everything else works fine....
×
×
  • Create New...