#163517 - 2006-06-22 10:09 AM
Problems while copying (BUG?)
|
Bjöppe
Fresh Scripter
Registered: 2006-06-22
Posts: 6
|
I have a script that is copying loads of icons to the startmenu, but have run into a slight problem. The following is the offending snippet:
Code:
If InGroup("$_defdomain$grupp") MD "$FPMENU\$flis\" Copy "$FPIcons\$flis\" "$FPMENU\$flis\" /c /r /s EndIf
Problem is that if there's a directory that contains, let's say for example two directories and 6 files, and the user do not have permission on the directories, but to the files (icons), it creates the first folder as a empty one and doesn't continue to copy the rest of the files (icons). Is that not what /c is supposed to do?
TIA.
|
|
Top
|
|
|
|
#163518 - 2006-06-22 10:55 AM
Re: Problems while copying (BUG?)
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
Hello and Welcome to the board.
What version of KiXtart are you using? Most of the older versions had problems with that. Not until 4.52 Beta 2 was most of it ironed out. Some was in 4.51 as I recall, but not fully till 4.52 I think.
Also might want to use this sort of code so you don't keep trying to create a folder that already exists.
Code:
If GetFileAttr($Folder) & 16 Exit 80 EndIf
|
|
Top
|
|
|
|
#163519 - 2006-06-22 11:06 AM
Re: Problems while copying (BUG?)
|
Bjöppe
Fresh Scripter
Registered: 2006-06-22
Posts: 6
|
Thank you, NTDOC -- Nice to be here!
I was using 4.51, but tried 4.52RC1 as per your suggestion. The same behaviour was still present, as to halting the copy-process when an assumed "PERMISSION DENIED" was encountered. I've tried to swap around the arguments and playing with the parameters, still no luck though 
Folders will never be present, since the whole menu-tree is deleted before creating it on each logon / forced update. Nice tip tho, thank you! (I noticed I didn't have to create the directory first, copy will fix that for me, so that's one down in streamlining the process, now just to get it to work... )
Cheers!
|
|
Top
|
|
|
|
#163521 - 2006-06-22 02:45 PM
Re: Problems while copying (BUG?)
|
Bjöppe
Fresh Scripter
Registered: 2006-06-22
Posts: 6
|
Quote:
hmm... I still there is a permission issue involved. like, if user has no rights on some folder, he can't edit the subfolders or their files either if not explicitly given access.
Yes, the general idea is to not let them get certain icons/folders if they do not have permission to copy them, and to only copy the ones they are "able" to. This works great for, say, 259 of 260 applications. Some applications has addons/extensions that are only relevant to a small group of people, who do not need the extra clutter, hence, reading the manual, COPY with the parameter /c should happily skip these files/folders and only copy those it's able to. My problem is that the copyoperation STOPS after encountering the first folder it recieves 'permission denied' on.
Hope this clears things up abit futher.
|
|
Top
|
|
|
|
#163524 - 2006-06-27 10:13 AM
Re: Problems while copying (BUG?)
|
Bjöppe
Fresh Scripter
Registered: 2006-06-22
Posts: 6
|
Problem with putting "one on each line" is that there's something like 1500 .lnk files and copying them one by one was kindof problematic. I worked around the problem by doing just that, on the folders that had differentiated permissions depending on what extra applications/extensions the user would get.
Thanks for the input anyway.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1376 anonymous users online.
|
|
|