![]() ![]() Don't take this as an insult i don't want to get you wrong on this, i accept the blame for not being specific enough. I should have been more clever on this and i am sorry. Although i did wrote up in the basic example that it could occur that files could be in different sub-folders From First post : txt1.txt,4,\test1\txt1.txt,999 txt2.txt,4,\test1\txt2.txt,999 txt3.txt,4,\test1\txt3.txt,999 txt4.txt,4,\test2\txt4.txt,999 We see that, in the third variable, the folder changes from test1 to test2. ECHO Once this operation is done, zip all the files together. ECHO It'll take the files and file path to generate a "%file%" to import. ECHO Make sure this program and all the files are in a single directory. OFF Will hide the command flow because no one cares. :p Thanks in advance please helpĬode: OFF CLS REM This program will generate a. For those wondering, yeah, that's my first batch program. As long as it can run with a single executable with a double click that would be perfect (i don't want to confuse our poor secretary). I am willing to use other programming language if needed but i believe batch should work. Final input in notepad would look like : Attachment Name,Type,File,Related Event txt1.txt,4,\test1\txt1.txt,999 txt2.txt,4,\test1\txt2.txt,999 txt3.txt,4,\test1\txt3.txt,999 txt4.txt,4,\test2\txt4.txt,999 And so on. Therefore a line would look like : %ATTACHMENTNAME%%T%%TRIMMEDFILEPATH%C%%D% (%C% is only a single comma) Translated it would be like this (let's say user input is 999) txt1.txt,4,\test1\txt1.txt,999 And this for all files contained in within the folder. That means i need to "trim" the filepath from : C:\Documents and Settings\Username\Desktop\Test File\test1\txt1.txt to \test1\txt1.txt and for related event, that would be the user input here. SET /P D=Please Input the ID Number: PAUSE > nul ECHO Attachment Name,Type,File,Related Event > Output.csv - Now, for every file inside the folder where the program will be dropped, i need to generate a text line with these information: For attachment name, i simply need the file name (like Report.pdf or Audio.mp4) For type, i need 4 (therefore %T%) For File, i need the filepath from inside the. ECHO It'll take the files and file path to generate a. PAUSE > nul ECHO Make sure this program and all the files are in a single directory. csv file are very long to create (by human) and generating them automatically would help us out a lot! Here's what i currently have - OFF CLS REM This program will generate a. ![]() That would help my department a lot because. ![]() What I'm trying to do, basically, is creating a. Hello people I got a little question here that shouldn't be very long. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |