>I'm really desperate here.
>I have a list of files in:
>D:\ftproot\edi\inbox\
>
>I want to move these files to :
>D:\ftproot\edi\tmp\
>before I can start processing.
>
>
>So I am using the code below but it doesn't work.
>I know I'm not eligible, but will you please help.
>
>
>opendir(INVOICES,'D:\ftproot\edi\test') || die "cannot open invoice: $!";
>
>while ($invoice = readdir(INVOICES))
>      {($invoice
>       
>rename('D:\ftproot\edi\test\$invoice','D:\ftproot\edi\tmp\$invoice');
>      }
>closedir(INVOICES) || die "can't close  INVOICES: $!";


uhh... if you dont need to write portable code, then the whole thing is as 
follows:

system("copy D:\ftproot\edi\inbox\*.* D:\ftproot\edi\tmp\");

or, to make sure it doesn't wait for response if a file exists:

system("copy /Y D:\ftproot\edi\inbox\*.* D:\ftproot\edi\tmp\");

you could, of course, write variables for the directory, cd to the first and 
move along and all, but it wont make much difference... maybe a few bytes 
8^)




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to