Author | Message | Time |
---|---|---|
JoeTheOdd | Uh, yeah. A friend of mine is looking for a program that can automatically take files from a list, and put them in an alternate location, from another list. Anyone know a program that can do this, or is willing to write one? | October 4, 2005, 9:57 PM |
K | Why do you need a list for the destination? Or do you want to rename the files as well as move them? | October 4, 2005, 10:04 PM |
Charles | Basically what the program is supposed to do is copy a file from a destination like C:\My Documents\Pics\Pic.bmp to another folder on a different computer that is networked with the source destination. Kind of need the ability to make a list of source locations and destination locations and a way to tell it what time to start this activity too please. Think it’s possible? | October 4, 2005, 10:13 PM |
JoeTheOdd | (Its for him =p) | October 4, 2005, 11:26 PM |
nslay | Write a script | October 5, 2005, 12:30 AM |
Kp | #!/usr/bin/perl # This is off-the-cuff, but it should do what you want. No warranties, of course. # This program is not suitable for any purpose at all. Back up your entire house before using. # User assumes all responsibility for installing perl and for any damage caused by the use, misuse, or incompetent use, of this program. while (<>) { chomp; ($l, $r) = split; rename $l, $r; } | October 5, 2005, 2:31 AM |
iago | I dunno, the easier way might be: scp `cat sourcefiles` destip:destdirectory Example: [quote]iago@Slayer:~/tmp$ touch test1 test2 testc iago@Slayer:~$ cat > files test1 test2 testc iago@Slayer:~/tmp$ scp `cat files` 24.76.173.61:/tmp iago@24.76.173.61's password: test1 100% 0 0.0KB/s 00:00 test2 100% 0 0.0KB/s 00:00 testc 100% 0 0.0KB/s 00:00 iago@Slayer:~/tmp$ [/quote] | October 5, 2005, 4:11 AM |
Kp | [quote author=iago link=topic=12959.msg130017#msg130017 date=1128485494]I dunno, the easier way might be: scp `cat sourcefiles` destip:destdirectory[/quote] True, but that doesn't permit per-file renames, and it'll require several extra utilities to work on an MS-Windows system. My method only requires perl. Yours requires scp, cat, and a shell smart enough to process backticks. :) | October 5, 2005, 4:39 AM |
iago | [quote author=Kp link=topic=12959.msg130020#msg130020 date=1128487187] [quote author=iago link=topic=12959.msg130017#msg130017 date=1128485494]I dunno, the easier way might be: scp `cat sourcefiles` destip:destdirectory[/quote] True, but that doesn't permit per-file renames, and it'll require several extra utilities to work on an MS-Windows system. My method only requires perl. Yours requires scp, cat, and a shell smart enough to process backticks. :) [/quote] Well, I was going to use a "for i in..." which would support renaming with a simple "cut" or something, but that would require you to input your password for every file :) | October 5, 2005, 8:34 AM |
JoeTheOdd | Hes in Windows =p | October 5, 2005, 8:18 PM |
rabbit | omg.....batch [code]copy %%a, %%b[/code] Done. | October 5, 2005, 9:37 PM |
JoeTheOdd | Hm, come to think about it, he could just map the drive hes backing up to as Z:. | October 5, 2005, 10:21 PM |
Explicit[nK] | I'm still lost as to what you guys are trying to do; all I'm getting out of this is the synchronization aspect, but I'm not exactly sure. | October 5, 2005, 10:24 PM |
JoeTheOdd | Charlie doesn't exactly have a stable system, yet he wants his files to stay safe. | October 5, 2005, 10:36 PM |
Yoni | [quote author=Kp link=topic=12959.msg130020#msg130020 date=1128487187] My method only requires perl. Yours requires scp, cat, and a shell smart enough to process backticks. :) [/quote] Kp's method, then, is the one with heavier requirements, isn't it? | October 5, 2005, 11:53 PM |
JoeTheOdd | 1) Map your backup drive to Z:, or if that drive is taken, substitute another letter. 2) Create a new file with Notepad.exe called backup.bat and save it on your desktop (or anywhere else) 3) In this file, put the following batch code: copy file newfile for each file. Example: copy C:\Windows\kernel32.exe Z:\Backup\Windows\Kernel32.exe copy C:\Documents and Settings\Joe\Pornography\* Z:\Backup\Documents and Settings\Joe\Pornography 4) To back up your files, just double click the script. | October 6, 2005, 2:32 AM |
iago | Ok, how about the easy way: Why doesn't he set up an FTP server? FileZilla seems like a good one. | October 6, 2005, 2:35 AM |