Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 1st, 2006, 04:55 PM
nattylife nattylife is offline
Closet coder
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2005
Location: Plantation, FL <---south florida
Posts: 1,193 nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Weeks 7 h 39 m 23 sec
Reputation Power: 56
Send a message via AIM to nattylife
Ftp and batch file question

im gonna be writing a script that will seach a folder for a certain file extension and FTP these particular files to an AS/400 server automatically (ie an in house service will be running that runs this script every few minutes). these files are being created by another small console app. i only want to send the files when they are complete, and since this process of createing them is pretty damn quick i dont think there will be a problem... but there is always the chance that the ftp script will try to send the file at a moment when the file will be open and being created. so if anyone can answer this, will the ftp fail if a file is open and being written too at that moment that it tries to send it(which would be great, because then the script could pick it up on the next pass) or will it send a partial file (which is not great)?
__________________

Reply With Quote
  #2  
Old May 1st, 2006, 06:08 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 999
no, it will not fail.

You should try copying it to another directory and then mv'ing it. you're guaranteed to be sorted via mv, since all it does it reroute an inode, and therefore doesn't actually move the file at all.

Reply With Quote
  #3  
Old May 2nd, 2006, 03:03 AM
fivesidecube fivesidecube is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Location: West Yorkshire, England
Posts: 206 fivesidecube User rank is Sergeant (500 - 2000 Reputation Level)fivesidecube User rank is Sergeant (500 - 2000 Reputation Level)fivesidecube User rank is Sergeant (500 - 2000 Reputation Level)fivesidecube User rank is Sergeant (500 - 2000 Reputation Level)fivesidecube User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 15 h 47 m 52 sec
Reputation Power: 10
Failure is a function of the operating system. LinuxPenguin is correct in that it won't fail on a linux/unix OS. On a Windows OS, then it depends upon the flags given then the file is create/opened by the creating process.

I agree about the moving of the file. This will work for for both OSs.

Reply With Quote
  #4  
Old May 5th, 2006, 09:00 AM
nattylife nattylife is offline
Closet coder
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2005
Location: Plantation, FL <---south florida
Posts: 1,193 nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level)nattylife User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Weeks 7 h 39 m 23 sec
Reputation Power: 56
Send a message via AIM to nattylife
just to follow up, yea i went with moving the file first to a temp FTP directory and from there a little mfc app will push the files to the server. thanks for the info.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Ftp and batch file question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway