BATCH File Monitor, Move, and Sorting

April 27, 2010 at 21:56:11
Specs: Windows XP, 4000+ / 2gb
Ongoing project to create a batch sorting program to assist in re-organising files on one computer. A server PC downloads files, PLUS! their are many older files that are scattered around on various partitions so, need the flexibility to sort various files into specific folder's on a second pc2 after they have been moved to it.

This topic is continued from a previous thread on this forum so I will be posting what I have here asap when I have followed previous instructions.

Michelle


See More: BATCH File Monitor, Move, and Sorting

Report •

#1
April 27, 2010 at 22:08:26
for anyone who's feeling masochistic today, here's the original:

sort+move downloaded files between 2 pcs


Report •

#2
April 29, 2010 at 11:49:34
Sorry for my delays, I am still studying the scripts :/

Been side tracked now got some windows issues to sort out, not sure what caused it but some path problems :(

Be back soon with the batch support help requirements.

Michelle


Report •

#3
October 21, 2010 at 13:28:43
OK Back to my batch file programming stuff for a while, I have been trying to optimise my batch files somewhat to speed things up. Using the XCOPY is fine if files with the A attribute are ready at the moment of copying, however, what I really need is some polling with the IF EXIST statement.

:loop1
sleep 30
i.e. IF EXIST newfile with ARCHIVE attrib set go to XCOPY
else goto loop1

:xcopy

***********************

Can someone help here please ?

Michelle


Report •

Related Solutions

#4
October 22, 2010 at 01:56:22
Not quite wuth you.

Do you want to identify the files with A set among all the files in that folder?


=====================================
Life is too important to be taken seriously.

M2


Report •

#5
October 22, 2010 at 02:00:25
BTW, I'm no great fan of a bat running continuously.

BTW2, Pretty long pause between April and October. :)


=====================================
Life is too important to be taken seriously.

M2


Report •

#6
October 22, 2010 at 18:17:04
HAHA Yeah I have no concept of time really, like I am living in a time warp lol yeah I do eventually get around to things, reason for delay is I had some problems with my server and decided to build a fresh one up from some bits a friend gave me, so some aspects of my batch such as copying files from server to other pc have now changed however, rather than confusing everyone on here decided to stick to the original plan.

except the polling idea, oh my batch is set to run no longer than 45 minutes before the task scheduler runs it again, and if the other PC is off-line it quits almost immediately, after checking for network i.e. WAN is up, if WAN is down it reboots the PC so I have some rules set-up to prevent it running all the time now.

Michelle


Report •

#7
October 22, 2010 at 18:22:47
Oh sorry I missed the first reply M2,

I a using XCOPY to copy only files with the attribute set of (a) after copying the files in the original location have the (a) attribute turned off by XCOPY

xcopy /s /i /m /f T:\complete\*.* G:\sort\Migrate\*.*

so the IF EXIST needs to look for files that have the ARCHIVE attrib still active.

Michelle


Report •

#8
October 24, 2010 at 20:49:05
Mechanix2Go said "Do you want to identify the files with A set among all the files in that folder?"

My Answer is Yes ;)

Michelle


Report •

Ask Question