CopyFile and MoveFile won't work in WinXP SP1

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
Dave

CopyFile and MoveFile won't work in WinXP SP1

Post by Dave » Sat May 03, 2003 1:06 am

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.

Dave1

Post by Dave1 » Sat May 31, 2003 2:38 pm

Still need help!
Has anyone else experienced similar problem?

User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Problems with CopyFile>

Post by migro » Sat Mar 13, 2004 3:49 am

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
regards
migro

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Mar 13, 2004 4:31 am

Here is a much shorter version of what was provided by migro.
Let>sourcedir=C:\anydir\sources\*.*
Let>destdir=D:\anydir\destination
CopyFile>%sourcedir%,%destdir%
Be sure to delete trailing blanks if you cut/paste from the forum postings.
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!

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Marcus, can you comment?

Post by mightycpa » Mon Dec 15, 2008 1:40 am

I have been struggling with this all day!

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 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:

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
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
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Mon Dec 15, 2008 2:00 am

The *.html on the destination is unnecessary.

Try:

Let>oldfiles=d:\Inetpub\wwwroot\woundedhorse_com\robot\*.html
Let>newfiles=d:\Inetpub\wwwroot\woundedhorse_com\wwwroot

That works for me.

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Post by mightycpa » Mon Dec 15, 2008 2:54 am

I guess it didn't look just like Bob's code!

Your help made it work...

Thanks

George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts