vbscript - FileSystemObject moves a file even when is being copied over FTP -


i have program checks periodically new files, , process them.

because want safe file not being copied on ftp, move file first.
strange thing in windows server 2008 file moved, when being copied, , ftp copy operation ends in new location.

how can possible?

i've tested problem use simple lines of code in vbs file:

dim fso set fso = createobject("scripting.filesystemobject") fso.movefile "bigfile.zip", "moved\bigfile.zip" 

well, when move file (in same drive), you're telling filesystem file can found somewhere else, you're not moving of data around. i'd guess move goes ahead , tells filesystem file can found, ftp operation has allocated space on harddrive actual data , fact file has been moved, won't affect data stored in way, , works.

if moved file drive i'd assume break somewhere.

if you've got access client, have client write tiny file afterwards name bigfile.zip.complete or similar, , server app wait before beginning processing, way you'd sure it's finished copying (this work in case connection goes down halfway through , client stops uploading file though it's not finished).

or if don't have access client, maybe try looking @ size of file, if hasn't changed in many seconds or minutes, it's finished.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -