|
|
The code doesn't look right to me because the first parameter to AddFile is
typically a URL (starting with http etc), but you're passing a filename. It
can be a file URL, but you're talking about "remote" as if it's an internet
connection.
--
Phil Wilson [MVP Windows Installer]
----
"Mustafa B." <mbuyukkaya@xxxxxxxxx> wrote in message
news:1118648397.201700.217590@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> I am trying to transfer 2000+ tif documents from a remote file server.
> When I try to add a file to the job I get an "The parameter is
> incorrect" error. Any ideas,
>
> thanks in advance
>
> Mustafa.
>
> here is a snippet from my code:
>
> private void CreateJob(string jobName, string[] localFileName ,
> string[] sourceFileName)
> {
> try
> {
> if(sourceFileName.Length > 0)
> {
> this._bitsjob = this._bitsman.CreateJob(jobName + " started at " +
> DateTime.Now.ToString());
>
> // this._bitsjob.Priority = JobPriority.Foreground;
> // this._bitsjob.NoProgressTimeout = this._job.NoProgressTimeout;
> // this._bitsjob.MinimumRetryDelay = this._job.MinimumRetryDelay;
>
> for(int i=0;i<sourceFileName.Length;i++)
> {
> if(!this.DoesFileExists(localFileName[i]))
> {
> this._bitsjob.AddFile(localFileName[i],sourceFileName[i]);
> }
> }
>
> this._bitsjob.ResumeJob();
> }
> }
> }
>
|
|