Batch File help - XCOPY command

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
trippnwo
Posts: 4
Joined: 04 Jun 2007 07:46
Contact:

Batch File help - XCOPY command

#1 Post by trippnwo » 04 Jun 2007 08:10

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
Last edited by trippnwo on 04 Jun 2007 10:53, edited 1 time in total.

trippnwo
Posts: 4
Joined: 04 Jun 2007 07:46
Contact:

#2 Post by trippnwo » 04 Jun 2007 08:28

i just noticed there is no space in the CD command.

I change that and it still does not run properly.

trippnwo
Posts: 4
Joined: 04 Jun 2007 07:46
Contact:

#3 Post by trippnwo » 04 Jun 2007 09:34

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

trippnwo
Posts: 4
Joined: 04 Jun 2007 07:46
Contact:

#4 Post by trippnwo » 04 Jun 2007 10:54

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 -

DosItHelp
Expert
Posts: 239
Joined: 18 Feb 2006 19:54

#5 Post by DosItHelp » 03 Jul 2007 22:20

awesome :)

Post Reply