#31438 - 2002-10-28 04:01 PM
Deleting a folder's contents and copying a new one down
|
Zoon
Fresh Scripter
Registered: 2002-10-23
Posts: 6
|
I tried to write the following code, but I'm not sure I have the syntax correct. The script runs without error (I know because its printing the text in the AT(x,x) command) but it doesnt do what its supposed to.
The user accounts are domain users only, all logging on to Windows XP. I am trying to copy down one of two different desktops based on the user group they are in. The path to the desktop is therefore c:\documents and settings\'+@SERID++'\desktop - however I think I have the syntax wrong somewhere.
Could someone please show me the error of my ways ?
code:
If INGROUP("KS1") use X: \\SCHOOLNT\KS1DESKTOP del "C:\DOCUMENTS AND SETTINGS\'+@USERID+'\DESKTOP\*.*" copy "X:\*.*" "C:\DOCUMENTS AND SETTINGS\'+@USERID+'\DESKTOP" use X: /d AT(3,4) "KS1" ENDIF
If INGROUP("KS2") use X: \\SCHOOLNT\KS2DESKTOP del "C:\DOCUMENTS AND SETTINGS\'+@USERID+'\ALLUSERS\DESKTOP\*.*" copy "X:\*.*" "C:\DOCUMENTS AND SETTINGS\'+@USERID+'\DESKTOP" use X: /d AT(3,4) "KS2" ENDIF
AT(5,4) "RAN"
|
|
Top
|
|
|
|
#31444 - 2002-10-28 04:42 PM
Re: Deleting a folder's contents and copying a new one down
|
Zoon
Fresh Scripter
Registered: 2002-10-23
Posts: 6
|
Students would have rights on their on desktop folder, which is why I am putting it into their own instead of into all users They are primary school ('elementary' to you US peeps ? ages 5 to 11). We are also using Fortres CleanSlate so any modification except files saved to the network mapped U: drive will be reset on reboot.
Thanks to all, lonkero's code was the first I tried, and it works perfectly
Now I just gotta passdown a policy file that enforces the desktop wallpaper and create 250 users lol !
PS : The first group is Key Skills 1, the second Key Skills 2; the desktop shortcuts copied down are for programs installed on all machines, but to give desktop shortcuts only for the programs they need. Teachers, well I havent decided yet ![[Big Grin]](images/icons/grin.gif) [ 28. October 2002, 16:46: Message edited by: Zoon ]
|
|
Top
|
|
|
|
#31449 - 2002-10-29 11:24 AM
Re: Deleting a folder's contents and copying a new one down
|
Zoon
Fresh Scripter
Registered: 2002-10-23
Posts: 6
|
Nice spot rocco - at first I wanted to put it in all users, and then I remembered that a standard user might not have full rights to that folder, so I edited the script. Obviously I missed one bit hehehehe
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 895 anonymous users online.
|
|
|