473,503 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to send files ?!

viktorijakup
10 New Member
Hi !!!

I have script, which sends file to current directory, but script sends 1 file in 1 runing script.

I need script, which sends several file, (I select and mark files myself) in 1 runing script.

What I must add to this script.

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. use File::Path;
  5. use Cwd;
  6. use File::Copy;
  7. use File::Spec::Functions;
  8. #hardcoded 
  9. my $FP = 'D:\conv';
  10. my $TP = 'X:\sgml_db';
  11. my ($from_file, $to_file) = ($ARGV[0], $ARGV[0]);
  12. my $cwd = `cd`;
  13. chomp $cwd;
  14. my ($from_dir, $to_dir) = ($cwd, $cwd);
  15. #rename dir part
  16. $to_dir =~ s/^\Q$FP\E/$TP/;
  17. mkpath($to_dir);
  18. copy(catfile($from_dir, $from_file), catfile($to_dir, $to_file)) 
  19.     or die "can't copy file";
  20. exit 0;
  21.  
Thank you !
Sep 12 '08 #1
2 1344
numberwhun
3,509 Recognized Expert Moderator Specialist
How are you supplying the file names you want to copy? However you do, you would just use a loop to cycle through a list of those files, sending them one at a time.

Regards,

Jeff
Sep 12 '08 #2
viktorijakup
10 New Member
Hi !!!

My method of selecting files is simple.

I open folder, select files with "Panel control commands: Ins or Shift + cursor keys" and run script.

Viki
Sep 15 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1901
by: Ruben Duarte | last post by:
Hi, Anybody knows if is posible in Linux with PHP to do upload of several files sending the data before that php script executes. Now in my server you do the upload (with html,form, multipart...
29
3509
by: | last post by:
I did a working code with CDONTS on NT4 Now I am testing is on w2k and it looks like objCDONTS.Send is completely ignored. I think is it ignored because it throws no errors, neither does the...
0
1934
by: CLarkou | last post by:
My program in Access (Office 97/2000/XP/2003) opens a database (MAIN MENU) with a listing of all databases in a directory. User selects what database wants to open, and program opens it. I am not...
4
1186
by: Wilfried Mestdagh | last post by:
Hello, If I make an application in C# and want so send/share the project source with someone else, which files do I have to send ? (because many files will be generated again if missing, but...
1
27164
by: GrantS | last post by:
I need to use a sendkeys key combination to automate the "accept files" that a remote user wants to send to me via Windows messenger. I am using automation to work with Windows Messenger client in...
7
1378
by: rom | last post by:
i know it's not exactly the place to post this question but i didn't find a betrer group. when i send a zipped folder with an asp.net application i cant use it on the destination computer. when i...
10
8920
by: Aj Blosser | last post by:
Hey guys, I have a question for you, I have a setup where I'm sending files through the POST to a php web page, I read the file contents, put that file contents as text into the POST string, and...
14
2264
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class...
6
6883
by: Harshpandya | last post by:
Hi all, I am working on the form in which you fill out the whole PHP form and e mail that details to someone. It is working fine. But now i want to send the same form to be sent to different...
3
2076
by: Aussie Rules | last post by:
Hi, I have an application that processes files from the users hard disk. The user is able to select what files they want processed from there hard disk in windows explorer. In windows...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.