Problem: when trying to update a file using '>>' I receive "Access Denied." I can create files using '>' or '>>'.For example: x:\echo hello > test.txt ; successful completionx:\echo hi >> test.txt ;failsACCESS DENIEDx:\I can update files using edit. Meaning I can open a file with edit make changes, and save changes.Setupserver Windows 2000 advanced server.Dos image win98 dos with networking support. Modified version of this image http://www.nu2.nu/bootdisk/network/I'm booting the diskless client using PXE, and loading the DOS image.I'm using TCP/IP and file sharing.I have full control access granted on the server to the files/folders I want to be able to change.Has anyone done anything like this before? Anyone know how i can fix this?
2/16/2006 10:53:08 AM
Not sure if this will help.. but I used to write files in DOS using copy con back when I used bootdisks to load windows 95 over a network:see this link http://www.computerhope.com/issues/ch000398.htm
2/16/2006 11:30:42 AM
Hmm.Usually that will happen if the file is open at the time.Creating the file the appending it on the next line in the script could be 'too ambitious' in some cases. Batch files do not wait for the previous line to complete before they go on to the next unless there is an intentional break. It is quite possible that the file is not yet closed from the previous operation.See if this works:
echo Make a new file > test.txtpauseecho Add a line > test.txt
FILENAME: OPERATION.BAT @echo off echo This statement will really go into a file later. echo Some other stuff ; *other code here* :exit
FILENAME: LOG.BAT @echo off if not exist %1 goto fail %1 > test.txt goto exit :fail echo Cannot find script! :exit
2/16/2006 11:43:31 AM
eraser That's a good idea, I'll give it a try and see what happens.on a related note, on a windows XP machine connected to the same server i can use the command prompt and the append arrows (>> ) to append files on the server with no problem. This is making me think it might be an issue with my particular dos image.[Edited on February 16, 2006 at 2:11 PM. Reason : .]
2/16/2006 2:00:14 PM
Since you are using _DOS_ instead of the NT Command Interpreter you could be running into a sharing violation. Such an event would cause an "access denied." If you have space on the disk, try to find a compatible version of the "SHARE.EXE" tool and add it to AUTOEXEC.BAT wit the proper parameters.
2/16/2006 2:13:11 PM