Batch file to sort files based on file name to network drive

終了済み 投稿 Mar 8, 2012 着払い
終了済み 着払い

I know this can be done, but i dont have the time or the expertise for this project.

I have read tutorials here for different situations;

[login to view URL]

[login to view URL]

Here are my files:

temp1\_For P Drive\[login to view URL] <-this is where the file will be located

temp1\_For P Drive\folder1\6228 AD [login to view URL]

temp1\_For P Drive\folder1\10711 [login to view URL]

temp1\_For P Drive\folder1\WO# 10800 [login to view URL]

temp1\_For P Drive\folder1\10778 [login to view URL]

temp1\_For P Drive\folder2\6800 [login to view URL]

And so on... (7 Folders with pdfs only)

this is a simplified version of what the folders are actually named, if needed i can give you that info also. The batch file should start with folder 1, and *attempt* to decide the folder it should go in. Each and every file will begin with a job number. It will either be 4 or 5 numbers. Sometimes it will have WO in front of it, sometime WO# and sometimes WO #, i have tried to persuade our data entry people to keep it uniform, but there may be instances where this can still happen. The files all need to be moved into their respective job folders. This, currently, is a very time consuming task. As the path could be very long, for example, P:\CURRENT JOBS\6789 - XXXXXXXXXXXXXXXXXXXXXXXXXX\Production Documents\Assemblies\PDF's\, where "XXXXX" is mostly text, but may also include commas, dashes, and underscores. However, the first 4 of the folder name are *always* going to be the job number, and this is all the information we should need. For the 5 digit jobs, the folder will *always* start with WO# followed immediately by the number (i.e. WO#10800 - XXXXXXXXXXXXXXX). There is one special case where the subfolder inside the folder actually contains the job number as well. (i.e. P:\CURRENT JOBS\6786 - XXXXXXXXXXXXXXXXXXXXXXXXXX\Production Documents\6786 In Shop Archive\Scope Reports\) I know this is redundant, and unnecessary, but this is how the file system is structured for thousands of jobs. Currently, there are 7 different folders which this batch file should process files in, and they each have a separate path for the file to be moved to the network drive.

If possible, since these files are extremely important, can we also set up error checking before the original file gets deleted, as well as any special character detection that the batch file can't handle (this is ok and understood as some files may have to be done manually) It would be preferred to have a readout at the end of the program to let the user know which files couldnt be moved, if any. And/or if everything went smoothly and/or if there were any errors.

Please let me know if all of this is possible, i think it is, i have programmed small batch files to aid in productivity, but this one is too large for me to handle. Thanks everyone for your time.

Also, error checking to see if there is a file in the network drive with the same name as the file to be moved, which can happen quite often. Thank you.

Also, these files original location is on the local C:\ drive of a computer connected to the network.

DOS

プロジェクトID: #1492489

プロジェクトについて

2個の提案 リモートプロジェクト アクティブ Apr 12, 2012

2人のフリーランサーが、平均$175 で、この仕事に入札しています。

hfbaker

I propose completing your project by using the scripting tool Perl. This tool is ideally suited for recognizing patterns in names. My approach would be as follows: 1)Build a list of all PDF file names in the source f もっと

$100 USD 1日以内
(0件のレビュー)
0.0
zkutch

Hello you can have bat, but more flexible is to increase money to $300 and have form to work with.

$250 USD 1日以内
(0件のレビュー)
0.0