iftp script copy deletes target files

Sep 24, 2008
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
 
Sep 24, 2008
23
0
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
 
Sep 24, 2008
23
0
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
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
> 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
 
Sep 24, 2008
23
0
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: 93

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
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
>
>
 
Sep 24, 2008
23
0
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: 88
Sep 24, 2008
23
0
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
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
> 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
 
Sep 24, 2008
23
0
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
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
> 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
 
Sep 24, 2008
23
0
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
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
> 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
 
Sep 24, 2008
23
0
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
 
May 20, 2008
603
0
Sammamish, WA
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
> 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
 
Sep 24, 2008
23
0
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
Thread starter Title Forum Replies Date
cgunhouse Problems With IFTP Support 3
vefatica IFTP and SFTP Support 7
vefatica WAD IFTP timeout? Support 3
B when doing SFTP via IFTP to my secure site my users always get the finger print key prompt Support 1
S iftp copying pgp files from ftp is not working Support 11
cgunhouse IFTP "/S" Option Support 6
vefatica WAD IFTP - old problem still there Support 2
cgunhouse IFTP Path Issue in V17 - Fixed Support 7
vefatica IFTP and active FTP Support 13
vefatica Both IFTP problems remain in build 50 Support 35
vefatica More on IFTP Support 7
vefatica IFTP problems (broken pipe?) Support 24
cgunhouse Foldermonitor and iftp Support 1
Charles Dye Minor nit: DIR /F, IFTP, colorization Support 4
Charles Dye IFTP, current directory, open new connection Support 0
D iftp problem Support 2
D iftp failure after upgrading to build 65 Support 9
S FTP site; IFTP access Support 10
J Problems with FTP after IFTP timeout Support 2
P iftp with ftp proxy Support 0
J IFTP issue Support 1
nikbackm IFTP questions Support 3
D "534 Fallback to [C]" after iftp Support 7
Joe Caverly SCRIPT and GetObject Support 3
vefatica SCRIPT ... TCC disappears Support 2
T How can I send a simple parameter to a script, in tc 25? Support 2
vefatica PSHELL: How pass arguments to script? Support 15
EDerH Powershell call from script Support 24
Joe Caverly .PS1 script does not work with PSHELL Support 11
MickeyF running program from script and (not) returning to script Support 12
T Fixed Echo randomly activated in script Support 4
fpefpe How to? script error Support 1
fpefpe How to? script error Support 0
vefatica @SCRIPT bug persists Support 4
D Catching the result of an evaluated script expression Support 0
Joe Caverly Non-conforming @Script Support 6
M The Matrix: a useless script ... Support 5
fpefpe How to? LUA script Support 0
T Change language in script Support 4
Steve Pitts Documentation Script errors invoking help Support 15
R How to? Launch and execute commands in tcmd.exe through MSBuild Script. Support 3
Joe Caverly @SCRIPT does not like all comments Support 2
Mordachai Help! How to set parameters for script I'm debugging?! Support 6
fpefpe How to? Script support Support 8
JohnQSmith "SCRIPT" Support 7
rconn Script kiddies on the attack Support 4
krischik Stop Script after Syntax Error. Support 6
H Ruby - Running External Ruby script crashes TCC Support 11
Joe Caverly SCRIPT Command Support 2
T Obfuscating passwords in script Support 14

Similar threads