Page 1 of 1

Batch File help - XCOPY command

Posted: 04 Jun 2007 08:10
by trippnwo
Hi,

My work is trying to run a batch file and is having problems getting it to work properly.

It is supposed to go to the D:\ drive - then to the fkormos\files\ directory.

Once there, it should copy all the files in fkormos\files into all the directories in the 5 commands below.

It should then delete all the files in the original directory and close.

Attached is a screen shot of what it does.

This batch file is stored in fkormos\files and a user logs in VIA ftp, then uploads the files to that directory, then runs the batch file. We are testing it on a machine where the user has full privileges on everything.

The drives X and F are networked drives.

Any help is greatly appreciated.

Thanks - Alan


d:
cd\fkormos\files
xcopy d:\fkormos\files\*.* d:\fkormos\files\bk\
xcopy d:\fkormos\files\*.* x:\bk\faye\
xcopy d:\fkormos\files\*.* x:\files\
xcopy d:\fkormos\files\*.* d:\archive\
xcopy d:\fkormos\files\*.* f:\Backup\
echo Y | del d:\fkormos\files\
exit

Posted: 04 Jun 2007 08:28
by trippnwo
i just noticed there is no space in the CD command.

I change that and it still does not run properly.

Posted: 04 Jun 2007 09:34
by trippnwo
update: i got the file to run locally but not when I log in VIA ftp and try it.

I added the space after CD and in case the paths are case sensitive, I changed those.

just to take a stab at it, here is a screen shot of serv-u and the mapping properties. I think it has to do with the fact that the x:\files is being mapped as files...

what do you think? How could it be run if serv-u sees X:\Files\ as Files

Posted: 04 Jun 2007 10:54
by trippnwo
i figured it out

I had to define a command in the FTP client in order to run it.

site exec /username/username.bat

works like a champ now -

Posted: 03 Jul 2007 22:20
by DosItHelp
awesome :)