Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

iftp script copy deletes target files

Sep
23
0
Hello,

TCC 10.00.75

I have some old TCC 8.x iftp scripts that used to run on XP Pro.

I try to run them on Windows Server 2008 with TCC 10, (iftp copy if newer) and it runs extremely slowly, and ends up deleting the files it is comparing on the target machine.

Do I need to change the scripts in any way to run them under TCC 10?

Thanks
 
Just wanted to clarify -

on the XP Pro machine, I have already upgraded to TCC 10. The scripts previously written and used under TCC 8 work on the XP Pro machine under TCC 10.

On Windows Server 2008, when I run the exact same scripts, the "copy /U" command systematically deletes the files on the target machine.

Each copy command in the script, deletes the corresponding files on the target machine.

On server 2008, the script runs very slowly, maybe 30 seconds for each copy command (which deletes the file on the target machine).

Pretty serious problem...

Thanks for any help
 
I guess I have to clarify a little more -

Although I did upgrade the XP Pro machine with TCC 10, it appears the TCC 8 is still running on the machine.

A double click on the btm file invokes TCC 8. So the correctly running script is running under TCC8, not TCC 10.

I will see if I can test the script on the XP Pro machine to see if it behaves the same as Server 2008 with TCC 10.

In any case, it is still a serious problem that the target files are being deleted
 
> I guess I have to clarify a little more -
>
> Although I did upgrade the XP Pro machine with TCC 10, it appears the
> TCC 8 is still running on the machine.
>
> A double click on the btm file invokes TCC 8. So the correctly running
> script is running under TCC8, not TCC 10.
>
> I will see if I can test the script on the XP Pro machine to see if it
> behaves the same as Server 2008 with TCC 10.
>
> In any case, it is still a serious problem that the target files are
> being deleted

Please post the batch file; without that I can't even begin to guess what
the problem might be. (We have not had any other reported problems with
COPY /U.)

Rex Conn
JP Software
 
Here is the batch file

I have a few doxen similar scripts to deploy web sites. They run under TCC 8 on XP Pro _usually_.

Every once in a while, even on the XP Pro/TCC8 environment, a target folders contents will be deleted.

I just re-run the script, and usually everything gets copied on the subsequent run. But it is a mystery, and I don't know if a folder's contents have been deleted until a client contacts me to ask what's wrong when some of there content is no showing up.

Thanks,

Kyle
 

Attachments

  • SupportCopyGeneric.btm
    5.1 KB · Views: 315
I only looked at your script briefly. But I noticed right off that you
use an outdated method for accessing your variables. The %var% syntax is
not necessary under TCC. And in many cases can confuse the parser into
choosing incorrect values.

I recommend you change to %var or %[var] syntax. The latter is the most
definitive way of making sure the parser selects the correct values.

Also, *.* is outdated as well. It was necessary in MS-DOS days. Just use
a single * to indicate "all files".

I don't know if those minor tweaks will change anything, but it's worth a
try. You could also add the /V switch to your IFTP commands to get
verbose output displayed. You might get a clue as to why/where the script
is failing.

-Scott



Kygre <> wrote on 12/07/2009 12:17:51 PM:


> Here is the batch file
>
> I have a few doxen similar scripts to deploy web sites. They run
> under TCC 8 on XP Pro _usually_.
>
> Every once in a while, even on the XP Pro/TCC8 environment, a target
> folders contents will be deleted.
>
> I just re-run the script, and usually everything gets copied on the
> subsequent run. But it is a mystery, and I don't know if a folder's
> contents have been deleted until a client contacts me to ask what's
> wrong when some of there content is no showing up.
>
> Thanks,
>
> Kyle
>
> Attached to this message is SupportCopyGeneric.btm
>
>
 
Scott,

Thanks for the reply - I made all the changes you suggested, but the script still deletes every file on the target, that I am attempting to copy.

It also runs very slowly, taking a long time with each copy command


I copied the script to my XP Pro machine, and it runs under TCC8, very quickly

I am attaching the output of the script. It doesn't seem to show any errors, but I might not know what to look for.

Thanks,

Kyle
 

Attachments

  • ScriptLog.txt
    17.5 KB · Views: 262
After making recommended changes, the iftp script is still deleting instead of copying. I attached the output log to the previous message.

I am able to operate for the time being because I still have the XP Pro machine with TCC8. But it is old and becoming unstable, and I really need to migrate to the newer workstation and portable with TCC 10.

Thanks for any assistance,

Kyle
 
> After making recommended changes, the iftp script is still deleting
> instead of copying. I attached the output log to the previous message.
>
> I am able to operate for the time being because I still have the XP Pro
> machine with TCC8. But it is old and becoming unstable, and I really
> need to migrate to the newer workstation and portable with TCC 10.

Still unable to reproduce this. COPY doesn't even have any code in it which
*could* delete files, unless you specify /W (which then calls SYNC).

Do you have any aliases or plugins active?

Rex Conn
JP Software
 
as far as outgoing ftp, my Server 2008 workstation is pretty bare bones. I'm able to use FileZilla to ftp out to my server and other servers.

My server is in a different time zone. FileZilla reports:

Timezone offsets: Server: -28800 seconds


The server is Windows 2008, but allows iftp from my xp Pro machine, and from FileZilla.


So generally speaking, ftp works going out from my server 2008 workstation, and ftp is received by my actual server (also 2008)


Not using any special plugins that I am aware of - do you have an example of a plugin that I might be using inadvertantly?

Not sure what you mean exactly by aliases, I'm using the ipaddress in the iftp call.

Here is the first part of the revised script that deletes each file that is supposed to be copied. It takes 20 or 30 seconds for each copy command to complete, and at the end of that period of time, the target file disappears.

Did you see anything suspicious in the log file?

The log file created by successfully running the script on TCC8 on the XP Pro has different information in it if that would be useful.



echo *** Establish iftp Session *******************************************************************
set SrcFullPath=%[SrcDrive]%[SrcPath]%[SrcFolder]
set Target=ftp://%[Lgn]:%[Pwd]@%[TrgIp]%[TrgPath]%[TrgFolder]/
iftp /V %[Target]

echo ***
echo ***
echo ***
echo *** Copy the Admin Root folder **********************************************************
set Target=ftp:
copy /U %[SrcFullPath]\AppSettings%[TrgMachine].config %[Target]
copy /U %[SrcFullPath]\AssemblyInfo.cs %[Target]
copy /U %[SrcFullPath]\DbConnect%[TrgMachine].config %[Target]
copy /U %[SrcFullPath]\Default.* %[Target]
copy /U %[SrcFullPath]\Global.* %[Target]
copy /U %[SrcFullPath]\Index.* %[Target]
copy /U %[SrcFullPath]\Index2.* %[Target]
copy /U %[SrcFullPath]\Test.* %[Target]
copy /U %[SrcFullPath]\Demo.* %[Target]
copy /U %[SrcFullPath]\web.config.%[TrgMachine] %[Target]
copy /U %[SrcFullPath]\web.config.%[TrgMachine] %[Target]web.config



Thanks,

Kyle
 
> Not using any special plugins that I am aware of - do you have an
> example of a plugin that I might be using inadvertantly?

Type "PLUGIN" at the TCC prompt and see if you have any loaded.


> Not sure what you mean exactly by aliases, I'm using the ipaddress in
> the iftp call.

I was referring to an alias for COPY.

It's not possible for COPY in V10 to ever delete a file (either source or
target). In v11, it *is* possible for COPY to delete a file when you're
syncing directories (with /W), but if you're using v10 you cannot be seeing
this. (Have you tried this with v11?)

After looking at your log, it appears that rather than the files being
copied and then deleted, they're never being copied in the first place. For
two different reasons -- some are Windows errors about not being able to
find the source file, and some are FTP 550 errors from the server, which is
a "permission denied" on the copy.

Can you do a manual copy from the command line (with the same login)?

Rex Conn
JP Software
 
Rex,

No Plugins or aliases.

Manual ipft copy gives the same 550 error

Most if not all of the file not found errors are expected, so the real errors are the 550 errors.

Since I can run this script from an XP Pro workstation with TCC8, the 550 permissions error seems to be wrong? I mean, I have permission and a successful copy under TCC8 on XP Pro.

Yes I agree that the file is probably never copied in the first place. But it does seem to be examined or something, since each Copy command is 20 to 30 seconds. At the end of that period of time, the file disappears from the server.

I checked the permissions on the server - my ftp login has full permissions on the target folder, which makes sense, because the copiy is successful from the older workstation.

Thanks,

Kyle
 
> Manual ipft copy gives the same 550 error
>
> Most if not all of the file not found errors are expected, so the real
> errors are the 550 errors.
>
> Since I can run this script from an XP Pro workstation with TCC8, the
> 550 permissions error seems to be wrong? I mean, I have permission and
> a successful copy under TCC8 on XP Pro.

I don't think it's a Server 2008 problem because I use that every day for
uploading to FTP servers. It's also apparently not a generic TCC problem
because you're the only one experiencing it. So it's likely to be a
configuration issue on your system, either with TCC or with Windows 2008
itself.

Are you certain your .INI settings are the same for v8 and v10? There are
some FTP-specific directives (active/passive & firewall settings, if any)
that could be affecting you.

Rex Conn
JP Software
 
Rex,

Which ini files should I look at? there don't seem to be any relevant ini files in the Program Files folder.

I agree that there may be something unique about my configuration (although it is fairly simple, with not very many software installs).

However, I can do the ftp copies with FileZilla, so the fundamental capability doesn't seem to be blocked.

Thanks,

Kyle
 
I believe echo %_ininame will show you

On Wed, Dec 9, 2009 at 12:46 PM, Kygre <> wrote:

> Rex,
>
> Which ini files should I look at? there don't seem to be any relevant ini files in the Program Files folder.
>
> I agree that there may be something unique about my configuration (although it is fairly simple, with not very many software installs).
>
> However, I can do the ftp copies with FileZilla, so the fundamental capability doesn't seem to be blocked.
>
> Thanks,
>
> Kyle
>
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
> Which ini files should I look at? there don't seem to be any relevant
> ini files in the Program Files folder.
>
> I agree that there may be something unique about my configuration
> (although it is fairly simple, with not very many software installs).
>
> However, I can do the ftp copies with FileZilla, so the fundamental
> capability doesn't seem to be blocked.

Without access to your FTP server for testing/debugging, (or at least
somebody else reporting a similar problem) I don't think there's anything
more I can do on this end.

Rex Conn
JP Software
 
Rex,

I can understand non-reproducable problems are hard to fix.

Its just that I have hundreds of these scripts and I built up a pretty big dependency on your iftp. Now that my XP Pro is getting old, I'm being forced to migrate.

The ini file is empty on my server workstation. On TCC8, there are some console related settings, but nothing that seems related to ftp.

If you think it is worthwhile I can give you access to the server.

It's just frustrating because FileZilla and other ftp programs successfully transfer the files.

In the end, I'm just trying to avoid migrating my hundreds of scripts to another scripting system.

If you'd like access to the server, just email me directly.

Thanks,

Kyle
 

Similar threads

Back
Top