A few weeks ago, I posted the problem and all reply posts did not think that it was true.
But the problem is indeed true.
When I manually copy or move a file to a folder, it works fine. Using Macro Scheduler script, it won't, and there is no error message neither. If I right click the folder and check the folder's property, it shows READ-ONLY. I can uncheck it, then apply then close the property window. But when I re-open the folder's property, the READONLY check is still there.
Please someone help with a step-by-step how to create a folder, or to remove the READONLY.
I found this article on Microsoft website:
This article was previously published under Q328065
SUMMARY
By default in Windows XP Service Pack 1 (SP1), if you click the Sharing tab of the Properties dialog box for the folder, and then share the folder for other users to access over the network, the folder has permissions that give everyone read-only access. In versions of Windows XP that are earlier than SP1, if you share folders by using the Sharing tab of the Properties dialog box, the folder has default permissions that gives everyone full control.
NOTE: This behavior is not true for folders that you share by using the New File Share Wizard and the Net.exe command. These folders continue to have default permissions that give everyone full control.
MORE INFORMATION
These changes to the default permissions settings are part of the security enhancements in SP1.
CopyFile and MoveFile won't work in WinXP SP1
Moderators: JRL, Dorian (MJT support)
Problems with CopyFile>
Hi,
thought I got the same problem, but in the end it was only an error in my script. If you like to copy some files from one directory to another try it like this:
// First define a varable for the sourcedir in this example you like to copy files from "sources" in C:\anydir\sources
Let>sourcedir=C:\anydir
// then concatenate it with the subdirectory
ConCat>sourcedir,\sources
// then concatenate it with the files you like to copy
ConCat>sourcedir,\*.*
//Do the same for the destination - in this example D:\anydir\destination
Let>destdir=D:\anydir
// then concatenate it with the subdirectory
ConCat>destdir,\destination
// at last use the copy command
CopyFile>sourcedir,destdir
If your sources or destination is located in deeper subdirectories you have to concatenate them also. Think the best is doing it one by one. If the destinatindirectory doesn't exist you might have to use the CreateDir> command
hope it will work for you
regards
migro
thought I got the same problem, but in the end it was only an error in my script. If you like to copy some files from one directory to another try it like this:
// First define a varable for the sourcedir in this example you like to copy files from "sources" in C:\anydir\sources
Let>sourcedir=C:\anydir
// then concatenate it with the subdirectory
ConCat>sourcedir,\sources
// then concatenate it with the files you like to copy
ConCat>sourcedir,\*.*
//Do the same for the destination - in this example D:\anydir\destination
Let>destdir=D:\anydir
// then concatenate it with the subdirectory
ConCat>destdir,\destination
// at last use the copy command
CopyFile>sourcedir,destdir
If your sources or destination is located in deeper subdirectories you have to concatenate them also. Think the best is doing it one by one. If the destinatindirectory doesn't exist you might have to use the CreateDir> command
hope it will work for you
regards
migro
regards
migro
migro
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Here is a much shorter version of what was provided by migro.
Be sure to delete trailing blanks if you cut/paste from the forum postings.Let>sourcedir=C:\anydir\sources\*.*
Let>destdir=D:\anydir\destination
CopyFile>%sourcedir%,%destdir%
Last edited by Bob Hansen on Mon Dec 15, 2008 7:41 pm, edited 2 times in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Marcus, can you comment?
I have been struggling with this all day!
Here's my code, looks just like Bob H's code:
I have the same symptoms as described earlier... I've got a folder that says read only in the properties dialog box... as do all the parent folders. None can be changed permanently. Files within the folders are NOT read-only, but it doesn't seem to matter to MS.
I've tried the attrib at the system prompt, but that doesn't work either.
The only way I could think of to work around this is:
where copy.bat copies the files over. But this doesn't do the job either... the copy.bat file FAILS when run by MS, but it succeeds when run from the GUI.
All of my users have the same FULL CONTROL file permissions, and it still doesn't work.
So, I don't really know what to do... the only clue I can give you is that WriteLn> works, but it takes too long to copy all my files using that command.
Tx,
George
Here's my code, looks just like Bob H's code:
Code: Select all
Let>oldfiles=d:\Inetpub\wwwroot\woundedhorse_com\robot\*.html
Let>newfiles=d:\Inetpub\wwwroot\woundedhorse_com\wwwroot\*.html
CopyFile>%oldfiles%,%newfiles%
I've tried the attrib at the system prompt, but that doesn't work either.
The only way I could think of to work around this is:
Code: Select all
Let>oldfiles=d:\Inetpub\wwwroot\woundedhorse_com\robot\*.html
Let>newfiles=d:\Inetpub\wwwroot\woundedhorse_com\wwwroot\*.html
CopyFile>%oldfiles%,%newfiles%
Let>RPWAIT=1
Run Program>d:\Inetpub\wwwroot\woundedhorse_com\robot\copy.bat
All of my users have the same FULL CONTROL file permissions, and it still doesn't work.
So, I don't really know what to do... the only clue I can give you is that WriteLn> works, but it takes too long to copy all my files using that command.
Tx,
George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey