Choosing multiple files
Hi I want to upload a selection of files to a server.
I can choose a single file
eg
set new_file to (choose file with prompt "Choose a file to save as PDF file.:")
but is it possible to select more than one file in the dialog box as in - select attachment in mail
thanks
Alternatively I could ask the user to select a folder which contains the required files. So is there a command to move the contents of a folder. (terminal or applescript)
Much appreciated any help
In Script Editor hit Shift-Command-L, in the library window double-click on the entry for "Standard Additions." In the dictionary select "User Interaction" and click on the entry for the "choose file" command. Note the fifth parameter:
[multiple selections allowed boolean] : Allow multiple items to be selected? (default is false)Since it's a boolean we can type it as:
choose file multiple selections allowed true
or
choose file multiple selections allowed yes
both of which compile to the standard form
choose file with multiple selections allowed
Similar Messages
-
Attaching multiple files to wiki on OS X Server
We have just installed a Mac Mini with OS X Server, for use as a Wiki.
Does anybody know if it is possible when attaching files to pages in the Wiki, you can choose multiple files rather that doing one at a time.
Thanks in advanceHi,
It's not currently possible. I did however file an Enhancement Request along those lines a few months ago. No word back from Apple. Perhaps if you file an enhancement request as well there will be additional motivation.
Jaime -
Applescript: Choose two files in different locations
Hello there, trying to combine multiple CSVs into one.
When I run this applescript, I can only choose multiple files within the same folder.
How to I change it so I can choose file A.csv in folder X, and then file B.csv in folder Y?
set theFiles to choose file with multiple selections allowed
set saveFile to POSIX path of (((path to desktop) as text) & "Hello.csv")
do shell script "cp " & quoted form of POSIX path of item 1 of theFiles & space & quoted form of saveFile
if (count of theFiles) = 1 then return
repeat with fileToAdd in theFiles
set x to quoted form of POSIX path of fileToAdd
do shell script "cat " & x & " | awk 'BEGIN {getline}{print $0}' >> " & quoted form of saveFile
end repeatQuick followup question, if you have time.
When I try to merge files using this method, I get duplicate entries in my CSV. For example:
file1.csv + file2.csv resultes in mergedfile.csv
When I try to merge mergedfile.csv with file3.csv, I get duplicate entries within the CSV of file1.csv & file2.csv
For example (pre-merge):
file1.csv
hello, greeting, "hello how are you"
hi, greeting, "hi, what's new?"
file2.csv
apple, fruit, "I like apples"
banana, yellow fruit, "i eat banans"
file3.csv
britney spears, pop singer, "britney is a good singer"
celine dion, better pop singer, "celine is better"
Merging file1 and file2 Results in:
mergedfile.csv
apple, fruit, "I like apples"
banana, yellow fruit, "i eat banans"
hello, greeting, "hello how are you"
hi, greeting, "hi, what's new?"
When mergedfile.csv is merged with file3.csv:
mergedfile.csv
apple, fruit, "I like apples"
banana, yellow fruit, "i eat banans"
hello, greeting, "hello how are you"
hi, greeting, "hi, what's new?"
apple, fruit, "I like apples"
banana, yellow fruit, "i eat banans"
hello, greeting, "hello how are you"
hi, greeting, "hi, what's new?"
britney spears, pop singer, "britney is a good singer"
celine dion, better pop singer, "celine is better"
Any help would be appreciated greatly! -
How to store multiple files from SAp in to Application server?
Hi Guys,
Can anybody tell me how to store multiple files from SAP into Application server.in my application i have to get the data from SAP tables BSEG , BKPF , BSAK and BSIK that to daily i have to do.
Any Logic or Code for how to do is welcomed.
plz help me urgently.
Thanks,
GopiHi,
directories creates basis. If you have task to store data in application server you already should have information into which folder you have to do it. If you don't have this information because it is just for example training for next task then you can use your personal folder into which you have access. To get list of all available folders please look at attached code and form get_directories (you get the list of folders you see in transaction AL11). But don't forget: If you are using open dataset you have to have rights to access application folder!
Here you are code which I use to upload text files from local disc into application folder
Regards,
Karol
*& Report FILE_PC_TO_SAP
REPORT FILE_PC_TO_SAP.
DATA: BEGIN OF searchpoints OCCURS 100,
DIRNAME(200) TYPE c, " name of directory.
sp_name(100) TYPE c," name of entry. (may end with *)
END OF searchpoints.
DATA: BEGIN OF isearchpoints OCCURS 10,
dirname(75) TYPE c, " name of directory.
aliass(75) TYPE c, " alias for directory.
svrname(75) TYPE c, " svr where directory is availabl
sp_name(75) TYPE c, " name of entry. (may end with *)
sp_cs(10) TYPE c, " ContainsString pattern for name
END OF isearchpoints.
data: l_file type filetable.
data: l_rc type i.
data: itab type TABLE OF string.
data: g_tmp_file_path type rlgrap-filename.
data: wa_itab type string.
data: h_destin(100) type c.
data: dat type string.
INITIALIZATION.
perform get_directories.
START-OF-SELECTION.
parameters: in_file type string OBLIGATORY LOWER CASE.
parameters: destin(100) type c OBLIGATORY LOWER CASE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = in_file
"FILETYPE = 'BIN'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
TABLES
DATA_TAB = itab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF sy-SUBRC <> 0.
write: / 'Error during loading input file!'.
ENDIF.
if h_destin is INITIAL.
h_destin = in_file.
endif.
CONCATENATE destin h_destin into dat SEPARATED BY '/'.
*TRANSLATE dat TO UPPER CASE.
OPEN DATASET dat FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-SUBRC = 0.
loop at itab into wa_itab.
TRANSFER: wa_itab TO dat.
endloop.
CLOSE DATASET dat.
write: / 'File uploaded!'.
ELSE.
write: / 'Not possible to open dataset'.
ENDIF.
at selection-screen on value-request for in_file.
perform select_input_file_name.
loop at l_file into g_tmp_file_path.
move g_tmp_file_path to in_file.
h_destin = ''.
SPLIT g_tmp_file_path at '\' into table itab.
loop at itab into g_tmp_file_path.
h_destin = g_tmp_file_path.
endloop.
endloop.
at selection-screen on value-request for destin.
DATA: lt_dfies TYPE TABLE OF dfies.
DATA: lwa_dfies TYPE dfies.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = '/BI0/PCO_AREA'
lfieldname = 'CO_AREA'
IMPORTING
dfies_wa = lwa_dfies.
lwa_dfies-tabname = 'searchpoints'.
lwa_dfies-REPTEXT = 'Destination directory'.
lwa_dfies-LENG = 100.
lwa_dfies-INTLEN = 100.
lwa_dfies-OUTPUTLEN = 100.
lwa_dfies-fieldname = 'SP_NAME'.
APPEND lwa_dfies TO lt_dfies.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SP_NAME'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'destin'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = searchpoints
FIELD_TAB = lt_dfies
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
*& Form select_input_file_name
* text
form select_input_file_name.
* call function 'F4_FILENAME'
* exporting
* program_name = sy-repid
* dynpro_number = sy-dynnr
* field_name = 'PATH'
* importing
* file_name = g_tmp_file_path.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Please choose a file'
"default_extension = '*.TXT'
"default_filename = 'C:\*.txt'
initial_directory = 'C:\'
file_filter = '*.*'
CHANGING
FILE_TABLE = l_file
RC = l_RC
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "select_input_file_name
*& Form WRITE_DB_HOME
* Write DB home directory
* no parameters
FORM write_db_home.
CASE sy-dbsys(3).
WHEN 'ORA'.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ORAHOME'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_ORAHOME', 30 searchpoints-dirname.
MOVE: 'DIR_ORAHOME' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
WHEN 'ADA'.
CALL 'C_GETENV' ID 'NAME' FIELD 'DBROOT'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_ADA_DBROOT', 30 searchpoints-dirname.
MOVE: 'DIR_ADA_DBROOT' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
WHEN 'INF'.
CALL 'C_GETENV' ID 'NAME' FIELD 'INFORMIXDIR'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_INF_INFORMIXDIR', 30 searchpoints-dirname.
MOVE: 'DIR_INF_INFORMIXDIR' TO searchpoints-sp_name.
APPEND searchpoints..
*--- C5056155 End of ALV -------------------------------*
WHEN 'DB6'.
CALL 'C_GETENV' ID 'NAME' FIELD 'INSTHOME'
ID 'VALUE' FIELD searchpoints-dirname.
IF sy-subrc = 0.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_DB2_HOME', 30 searchpoints-dirname.
MOVE: 'DIR_DB2_HOME' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
ELSE.
EXIT.
ENDIF.
WHEN OTHERS.
EXIT.
ENDCASE.
ENDFORM. " WRITE_DB_HOME
FORM get_directories.
* get the name and aliases of ALL userdefined directories
SELECT * FROM user_dir INTO isearchpoints
WHERE svrname = sy-uname.
MOVE isearchpoints-dirname to searchpoints-dirname.
MOVE isearchpoints-aliass to searchpoints-sp_name.
APPEND searchpoints.
ENDSELECT.
SELECT * FROM user_dir INTO isearchpoints
WHERE svrname = 'all'.
MOVE isearchpoints-dirname to searchpoints-dirname.
MOVE isearchpoints-aliass to searchpoints-sp_name.
APPEND searchpoints.
ENDSELECT.
* Get DB home
IF sy-dbsys(3) = 'ADA'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ATRA'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_ATRA' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_BINARY'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_BINARY' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory $DIR_CCMS
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CCMS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CCMS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CT_LOGGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CT_LOGGING' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CT_RUN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CT_RUN' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_DATA'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_DATA' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'DB6'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_DBMS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_DBMS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_EXECUTABLE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_EXECUTABLE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_EXE_ROOT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_EXE_ROOT' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GEN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GEN' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GEN_ROOT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GEN_ROOT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GLOBAL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GLOBAL' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GRAPH_EXE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GRAPH_EXE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GRAPH_LIB'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GRAPH_LIB' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_HOME'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_HOME' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'INF'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_INSTALL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_INSTALL' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_INSTANCE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_INSTANCE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_LIBRARY'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_LIBRARY' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_LOGGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_LOGGING' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the files written by the memory inspector
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_MEMORY_INSPECTOR'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_MEMORY_INSPECTOR' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'ORA'.
PERFORM write_db_home.
ENDIF.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PAGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PAGING' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PUT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PUT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PERF'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PERF' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PROFILE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PROFILE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PROTOKOLLS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PROTOKOLLS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_REORG'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_REORG' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ROLL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_ROLL' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_RSYN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_RSYN' TO searchpoints-sp_name.
APPEND searchpoints.
* calculate directory for saphostagent (no sapparam available...)
IF ( sy-opsys(3) = 'WIN' ) OR ( sy-opsys(3) = 'Win' ).
DATA: windir_path(64), programfiles_path(64).
* hoping that ProgramFiles is set in service user environment
CALL 'C_GETENV' ID 'NAME' FIELD 'ProgramFiles'
ID 'VALUE' FIELD programfiles_path.
IF programfiles_path IS INITIAL.
* %ProgramFiles% not available. guess from windir
CALL 'C_GETENV' ID 'NAME' FIELD 'windir'
ID 'VALUE' FIELD windir_path.
* e.g. S:\WINDOWS ==> S:\Program Files
CONCATENATE windir_path(3) 'Program Files' INTO programfiles_path.
ENDIF.
CONCATENATE programfiles_path '\SAP\hostctrl'
INTO searchpoints-dirname.
ELSE.
* on UNIX, the path is hard coded
searchpoints-dirname = '/usr/sap/hostctrl'.
ENDIF.
MOVE: 'DIR_SAPHOSTAGENT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SAPUSERS'
ID 'VALUE' FIELD searchpoints-dirname.
IF searchpoints-dirname = '.'.
IF sy-opsys = 'Windows NT'.
searchpoints-dirname = '.\'.
ELSE.
searchpoints-dirname = './'.
ENDIF.
ENDIF.
MOVE: 'DIR_SAPUSERS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SETUPS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SETUPS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SORTTMP'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SORTTMP' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SOURCE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SOURCE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TEMP'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TEMP' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRANS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRANS' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRFILES'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRFILES' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRSUB'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRSUB' TO searchpoints-sp_name.
APPEND searchpoints.
* get the name of the current server.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'rdisp/myname'
ID 'VALUE' FIELD searchpoints-dirname.
data: h_ind type i.
LOOP AT searchpoints.
h_ind = sy-tabix.
IF searchpoints-sp_name IS INITIAL.
DELETE searchpoints INDEX h_ind.
ENDIF.
ENDLOOP.
ENDFORM. -
Convert multiple files (word docs) to multiple pdf
Hi,
Is there a script I can use in batch processing to convert about 1500 word documents into pdf? I know it's possible to convert multiple files into one pdf, but this is no good to me. Doing these conversions one by one is going to take forever!
I've tried selecting a few documents at a time and then selecting "convert to pdf" from the right-click menu, but each one requires that you tell it where to save, and then opens the file when it is done.
I need to convert Word files on a regular basis for work, and could really use a batch process for this with so many to do!
I have Acrobat 7 Pro (version 7.1.0) on XP Pro SP 2 at work, and Acrobat 8 Pro (Version 8.1.2) on XP Pro SP 3 at home.
If there is anyway it's possible to do this via a batch process I would really appreciate knowing how!!
Apologies if this has been covered in another thread, I searched but couldn't find anything.
Thanks in advance :)I have Acrobat 9 Pro. I can batch convert Word docs to PDFs by doing this:
1. Open Acrobat Pro. Click File > Create PDF > Batch Create Multiple Files...
2. A window will open prompting you to add files. Click Add Files > Add Files... OR Add Folders... If adding a folder, navigate to it, and click OK to add it to the list. You can also select a bunch of files and drag & drop them into the Add Files window.
3. Once you have all the files listed that you want to convert, click OK. A new window called Output Options will open. In this window, select your preferred settings. For me, I want all the new PDFs to have the same filename and be in the same folder as the Word docs, so I choose these settings:
4. Click OK, and then the batch process will begin running. You will see Word opening and closing. However, you won't have to click Save or anything. You can run it unattended. The process takes a little while, so I usually set up a batch to run, then go to lunch. Once finished, you should have all your new PDFs:
Hope that helps someone! -
How to attach multiple file in one mail
Hi,
I've problems with sending multiple files via Gmail account (Ipad version) When sending the photo or video, I've to just click the photo and choose send to mail one by one. Any simpler way? Sometimes i did sent both mpg and jpg but the reciepient didn't see any attachment too
Anyone can help advise how to attach different file (doc, video, photo) in one mail will be a lot appreciated. Thank you so muchYou can attach multiple pictures to an email on an ipad2. Don't know about original iPad.
Choose a photo or take a screen shot (hold down home button and button next to volume control at same time--screen shot now will appear in photos).
Go to photos and edit your picture or screen shot, save it, then hold down on the image and copy it.
Go to mail, create a new mail and paste it in.
Save you mail as a draft.
Go back to photos and select a different photo, copy it, and return to your draft, and paste it in. Repeat if you need to add more.
Anything that you can take a screen shot or have an photo of can be pasted in one at a time into that draft email.
If mail gets uncooperative, during this process, then double click on home button and quit multitasking mail, then open up mail again and send your draft. Uncooperative means gets frozen. -
I am trying to open 20-25 files at the same time as Photoshop Raw [*.RAW] files.
The only way I can open multiple files is if i leave the file type as All Formats. When I change it to Photoshop Raw [*.RAW], the files a deselected.Use bridge. Select all the files then press ctrl-r or cmd-r to load the selected files into camera raw.
If you try this in Photoshop use File>Open As then for file type choose camera raw. (I have not tested open as for opening multiple files) -
Multiple file links in a single page: A better way to/efficient way to handle ?
Aloha Everyone!
I would like to ask the community how they have handled multiple file links in a single page. Sort of a pseudo database of files.
Here is the webpage I have been working on:http://huichawaii.org/
Here is what I have done to show files so far:
old version:http://huichawaii.org/proceedings---2012-education%2c-math---engineering-technology.html
new version: http://huichawaii.org/ahs2013-proceedings.html
The website works best in Chrom or Firefox, still have to convert the flash header to an edge animate .
Mahalo in advance for everyone's input!Depending on what other text you might have, you could use the data list component.
To get the text to have underlines, you will need to edit the repeated item. You can also adjust colors and fonts as well. The default rollover and selected states will probably not be the UI that want, so make sure you change those as well.
Now for the interactivity, select the datalist, and use the interactions panel, choose "On Select", then "Go To Url", the trick is to make sure the "When a specific item is selected" is also set. Here are the basic settings to get your links working:
Add new interactions for each item you want to be functional. -
Hi I am looking for a way to have trace32 open multiple files on remote computers
Simply put I am looking for someone who could afford to give me a basic script (vbs) that I could run from an elevated command prompt. It would need to be available for me to type in the name of a remote computer or (mulitple if possible) and also
allow me to choose log files to open or multiple files and then open them using trace 32. Hopefully it would detect the available log files and show me what is available to choose to open... anyone know of such a thing or know how to go about setting up something
like this for people to use?
EDIT
I was able to create a basic script to do what I wanted but I want to be able to add wildcards for the rollover logs... Can someone suggest the easiest way to do that as I am not sure how to add the wildcards directly before the .log
here is the script.
' ******Created by Luis Delgado*********
'This script will get a remote computers .log files depending on which documents you enter in the "files to open on remote computer using trace32" section
'Get and open log files on remote Computer
on error resume next
Set WshShell = Wscript.CreateObject("Wscript.Shell")
strcomputer = inputbox("Enter remote computer name or leave as localhost for this computer","Get log files from a remote computer with Trace32","Localhost")
If strComputer = "" Then
WScript.Quit
End If
'Opens trace32
wshShell.run "C:\Program Files\ConfigMgr 2007 Toolkit\CCM Tools\Trace32.exe"
'Files to open on remote computer using trace32
wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\datatransferservice.log"
wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\ccmexec.log"
wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\locationservices.log"
!!!!NOTE!!!
What I need is for any file that starts with datatransferservices, ccmexec, or locationservices to open in trace32
my thought would be place a wild card in its respective spots but it does not work see below
wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\datatransferservice*.log"
wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\ccmexec*.log"
wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\locationservices*.log"The roll over logs all have the same name exact the extension is .lo_ , So.. I'm not sure what you are looking for.
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ -
How do you upload multiple files?
Hi,
This is propably an easy one.
I am trying to upload multiple .gif files to a folder in KM.
I went to Content Management -> KM Content and created a new folder inside a sub-folder.
Now when I click on the contect menu I select New.. and then Upload...
However, this only allows me to select for upload one file at a time.
I neeed to upload about 50 files. It will take ages doing this one by one!
Is there a quicker way?Hi
Multiple upload of files is possible by using WEBDAV protocol.To use this follow the below steps.
Go to folder to which u want to upload the files and the click on the context menu and select details.A new window will open up.In that select settings->properties->accesslinks.copy the WEBDAV link shown there.
Now
click My Network Places on your desktop, and choose Tools from the top menu bar/Map Network Drive from the context menu. If you donu2019t find My Network Places on your desktop you can find it under Windows Start menu option on your computer.
select Sign up for online storage or connect to a network server. Click next
Highlight Choose another network locations. Click next
Use Cntrl+V to paste the URL path name(webdav URL). Click next
Change the URL location to the name of the folder in KM. Hit next. Hit finish
A folder by the name you just created will appear under my network places on your explorer application.
Using this u can upload multiple files directly into folder u want.
Hope this solves ur problem.
Regards
Hussain. -
Using script on multiple files in a folder.
THis has GOT to be easy, but I can't figure it out.
Walgreens wants you to email photos to them, but I usually do like 50 photos at a time. So, I created a script that takes an object and emails it. The problem is, I don't know how to do it to one photo, then the next, etc. It will do all the photos, but that is one HUGE email!
So that's my question. How do I get the script to run individually on multiple files?
Thanks in advance.
DaveCopy, paste, edit (where appropriate), and save - the code below as an application (AppleScript applet):
-- Code starts here --
property toAddress : "[email protected]"
property tSubject : "Please process my photo(s)."
on run {}
my send_Photos(choose file with multiple selections allowed)
end run
on open (dItems)
my send_Photos(dItems)
end open
on send_Photos(tItems)
with timeout of 0 seconds
tell application "Mail"
repeat with i in tItems
try
set tMessage to make new outgoing message with properties {visible:true}
tell tMessage
make new to recipient at end of to recipients with properties {address:toAddress}
set subject to tSubject
tell application "Finder" to set fname to displayed name of i
set content to ("Attached is the photo: '" & fname & "'." & return & return)
tell content to make new attachment with properties {file name:i} at end of last word of last paragraph
send
end tell
end
end repeat
end tell
end timeout
end send_Photos
-- Code ends here --
Double click on the applet and select the desired file(s), or drag the desired file(s) onto the applet - for further processing. -
Error message when trying to merge multiple files into single PDF file
Greetings! I'm on windows 7 professional, adobe 9 pro and a 64 bit PC. When I try to merge several PDF files from the same folder into a single PDF file I get this error message "You can choose multiple items only if they are all located in the same folder" - Please help! Thx.
The product is Acrobat, not Adobe. That being said, I suspect you may only be running AA 9.0 and that may be the issue. If you have not done the updates to the 9.5.5, you probably should. That may fix the issue you are having, particularly since you mentioned a 64-bit system.
-
Scanning in preview to multiple files no longer possible?!
I am using an HP OfficeJet Printer to scan from the document feeder wirelessly to preview.app. It used to function flawlessy but now I ran into a problem that caused me to almost through my AirBook across the room.
Using the import from scanner option in preview under lion I choose "Document Feeder" and the scanner starts to pull in the pages. preview.app - as it used to do then - opens a new window with the frist page and keeps adding new ones as they are transmitted from the scanner. so far so normal. what happens then is very annoying: every time a new page arrives - the one before that gets overridden with the the one. preview app scans page after page only to override the newly acquired scan.
I always end up with something that looks quite funny: X amount of pages in the sidebar of my preview window containing a thumbnail of the same LAST page that was scanned...
Does anyony have an idea hwo to solve this problem?
Another thing just springs to my mind. It used to be that preview app would let you name the to be scanned image (or it would use the default "scanned image") and during the scanning process it would just name the pages / documents "scanned image", "scanned image 01"...
Now - probably because of the new versioning feature of lion - which I find very very confusing - all scans appear under the same name... That is probably the reason for the overwrite behaviour.
Thank you very much for your time everybody – I appreciate feedback.
Using 10.7.1 and also installed printer drivers HP update that came around yesterday or the day before that.You probably have the camera raw dialog set to output 16 bits/channel.
Open a camera raw file and at the bottom of the camera raw dialog where it says Bit Depth choose 8 bits/channel and click done.
Then try the using process multiple files.
MTSTUNER -
Email notification to specific user when processing multiple files at a time
Hi
I am new to SSIS and error mail notification ,can some please provide details for my urgent and prioritized task in my project.
below is the requirement
I have a package for multiple file processing using for each file enumerator .each file having same column definition but for different
users and different name .
i have some mandatory fields to form unique id on combination
1.when files processing any data missed on mandatory fields it should alert users saying following line and fields are missing mandatory
information
2.email notification should send to respective users based on file name.
example :
file1:bitunimous.xls
file 2.oxford.xls
each file having following fields
file 1:bitunimous.xls
claim no: claimant: subclaim:
1001 abc 0
1002 abc 1
1002 abe 0
1004 0
here bitunimous.xls missed claimant value for 4th line then email needs to send to [email protected] as
line no 4 missed claimant information for unique key generation like that.
file 2.oxford.xls
claim no: claimant: subclaim:
2001 det 0
2002 pre 1
pqr 0
2004 frc
here oxford.xls missed claimno value for 3rd line then email needs to send to [email protected] as
line no 3 missed claimno information for unique key generation like that.
can anybody please provide solution
Thanks .
AmbedYou need to have a package with below work flow
1. ForEachLoop container with file enumerator to loop through files
Have variable inside loop to get the filename during each iteration. Create another variable called emailaddress, set EvaluateAsExpression property to true and set expression as
REPLACE(@[User::FileName],".xls","") + (DT_STR,20,1252) "@xyx.com"
2. Add tasks for validating data. Capture details of error on a string variable @[User::Error]
3. link a sent mail task to previous task and choose expression and constraint option. Set Constraint as On Completion and Expression as LEN(@Error) > 0
Inside Sent mail task set expression for ToLine and MessageSource properties to map to variables @[User::EmailAddress] and @{User::Error] respectively to sent notifications
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Read multiple files and save all into one output file(AGAIN)
Hi, guys
I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
public class FileReduction1 extends JFrame implements ActionListener
// GUI definition and layout
/* ACTION PERFORMED */
public void actionPerformed(ActionEvent event) {
if (event.getActionCommand().equals("Open File")) getFileName();
/* OPEN THE FILE */
private void getFileName() {
// Display file dialog so user can select file to open
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.setMultiSelectionEnabled(true);
int result = fileChooser.showOpenDialog(this);
// If cancel button selected return
if (result == JFileChooser.CANCEL_OPTION) return;
if (result == JFileChooser.APPROVE_OPTION)
files = fileChooser.getSelectedFiles();
textArea.setText("");
if(files.length>0)
filelist="";
System.out.println("files length"+files.length);
for(int i=0;i<files.length;i++)
System.out.println(files.getName());
filelist+=files[i].getName()+" ,";
if (checkFileName(files[i]) )
openButton.setEnabled(true);
readButton.setEnabled(true);
textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
readFile(files[i]);
textfield.setText(filelist);
else{JOptionPane.showMessageDialog(this,"Please select file(s)",
"Error 5: ",JOptionPane.ERROR_MESSAGE); }
// Obtain selected file
/* READ FILE */
private void readFile(File fileName_in) {
// Disable read button
readButton.setEnabled(false);
// Dimension data structure
getNumberOfLines(fileName_in);
data = new String[numLines][4];
// Read file
readTheFile(fileName_in);
// Rnable open button
openButton.setEnabled(true);
/* GET NUMBER OF LINES */
/* Get number of lines in file and prepare data structure. */
private void getNumberOfLines(File fileName_in) {
int counter = 0;
// Open the file
openFile(fileName_in);
// Loop through file incrementing counter
try {
String line = fileInput.readLine();
while (line != null) {
counter++;
System.out.println("(" + counter + ") " + line);
line = fileInput.readLine();
numLines = counter;
closeFile(fileName_in);
catch(IOException ioException) {
JOptionPane.showMessageDialog(this,"Error reading File",
"Error 5: ",JOptionPane.ERROR_MESSAGE);
closeFile(fileName_in);
System.exit(1);
/* READ FILE */
private void readTheFile(File fileName_in)
// Open the file
//int row=0;
int col=0;
openFile(fileName_in);
System.out.println("Read the file");
// Loop through file incrementing counter
try
String line = fileInput.readLine();
while (line != null)
boolean containsDoubles = false;
double temp;
String[] lineParts = line.split("\t");
try
for (col=0;col<lineParts.length;col++)
temp=Double.parseDouble(lineParts[col]);
data[row][col] = lineParts[col];
containsDoubles = true;
System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
} catch (Exception e) {row=0; col=0; temp=0.0;}
if (containsDoubles){ row++;}
System.out.println();
line = fileInput.readLine();
catch(IOException ioException)
JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
closeFile(fileName_in);
System.exit(1);
//System.out.println("length"+data.length);
closeFile(fileName_in);
process(fileName_in);
/* CHECK FILE NAME */
/* Return flase if selected file is a directory, access is denied or is
not a file name. */
private boolean checkFileName(File fileName_in) {
if (fileName_in.exists()) {
if (fileName_in.canRead()) {
if (fileName_in.isFile()) return(true);
else JOptionPane.showMessageDialog(null,
"ERROR 3: File is a directory");
else JOptionPane.showMessageDialog(null,
"ERROR 2: Access denied");
else JOptionPane.showMessageDialog(null,
"ERROR 1: No such file!");
// Return
return(false);
/* OPEN FILE */
private void openFile(File fileName_in) {
try {
// Open file
FileReader file = new FileReader(fileName_in);
fileInput = new BufferedReader(file);
catch(IOException ioException) {
JOptionPane.showMessageDialog(this,"Error Opening File",
"Error 4: ",JOptionPane.ERROR_MESSAGE);
textArea.append("OPEN FILE\n---------\n");
textArea.append(fileName_in.getPath());
textArea.append("\n");
//System.out.println("File opened successfully");
/* CLOSE FILE */
private void closeFile(File fileName_in) {
if (fileInput != null) {
try {
fileInput.close();
catch (IOException ioException) {
JOptionPane.showMessageDialog(this,"Error Opening File",
"Error 4: ",JOptionPane.ERROR_MESSAGE);
System.out.println("File closed");
private void process(File fileName_in) {
//getNumberOfLines();
//data = new String[numLines][3];
// Read file
double temp,temp1;
//readTheFile();
//System.out.println("row:"+row);
//int number=data.length;
//System.out.println(number);
for (int i=0; i<row; i++)
temp=Double.parseDouble(data[i][1]);
sumx+=temp;
temp1=Double.parseDouble(data[i][3]);
sumy+=temp1;
multixy+=(temp*temp1);
square_x_sum+=(temp*temp);
square_y_sum+=(temp1*temp1);
//System.out.println("Sum(x)="+sumx);
double tempup=(row*multixy)-(sumx*sumy);
double tempdown=(row*square_x_sum)-(sumx*sumx);
slope=tempup/tempdown;
double tempbup=sumy-(slope*sumx);
intb=tempbup/row;
double tempside=(row*square_y_sum)-(sumy*sumy);
double cordown=Math.sqrt(tempdown*tempside);
corr=tempup/cordown;
r_sqrt=corr*corr;
textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
textArea.append("\n");
textArea.append("Please enter output file name including extension.");
System.out.println("number"+row);
System.out.println("slope(m)="+slope);
System.out.println("intecept b="+intb);
System.out.println("correlation="+corr);
System.out.println("correlation="+r_sqrt);
saveFile();
private void saveFile()
textArea.append("SAVE FILE\n---------\n");
if (openFile1())
try {
outputToFile();
catch (IOException ioException) {
JOptionPane.showMessageDialog(this,"Error Writing to File",
"Error",JOptionPane.ERROR_MESSAGE);
private boolean openFile1 ()
// search for the file path
StringBuffer stringpath;
title=textfield1.getText().trim();
int temp=fileName_in.getName().length();
int temp_path=fileName_in.getPath().length();
int startd=(temp_path-temp);
stringpath=new StringBuffer(fileName_in.getPath());
stringpath.delete(startd, temp_path+1);
//System.out.println("file-path="+temp_path);
//System.out.println("length-file="+temp);
path=stringpath.toString();
fileName_out = new File(path, title);
//System.out.println(file_out.getName());
if (fileName_out==null || fileName_out.getName().equals(""))
JOptionPane.showMessageDialog(this,"Invalid File name",
"Invalid File name",JOptionPane.ERROR_MESSAGE);
return(false);
else
try
boolean created = fileName_out.createNewFile();
if(created)
fileOutput = new PrintWriter(new FileWriter(fileName_out));
fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
return(true);
else
fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
return(true);
catch (IOException exc)
JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
return(false);
private void outputToFile() throws IOException
// Initial output
textArea.append("File name = " + fileName_out + "\n");
// Test if data exists
if (data != null)
fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
textArea.append("File output complete\n\n");
else
textArea.append("No data\n\n");
// End by closing file
initialcomp();
fileOutput.close();
private void initialcomp()
slope=0.0;
intb=0.0;
corr=0.0;
r_sqrt=0.0;
sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
for(int i=0;i<data.length;i++)
for(int j=0;j<data[i].length;j++)
data[i][j]=null;
/* MAIN METHOD */
public static void main(String[] args) throws IOException
// Create instance of class FileChooser
FileReduction1 newFile = new FileReduction1("File Reduction Program");
// Make window vissible
newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
newFile.setSize(500,400);
newFile.setVisible(true);
Sorry about the long lines.
As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
Does anybody have an idea to solve this?
Thanks a lot!!you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
your code is doing too much..and hard to follows..
1. get the selected files
for each selected file
process the file and return the result
write out the result.
/** close the precious resource */
public void closeResource(Reader in){
if (in != null){
try{ in.close(); }
catch (Exception e){}
/** get the total number of line in a file */
public int getLineCount(File file) throws IOException{
BufferedReader in = null;
int lineCount = 0;
try{
in = new BufferedReader(new FileReader(file));
while ((in.readLine() != null)
lineCount++;
return lineCount;
finally{ closeResource (in); }
/** read the file */
public void processFile(File inFile, File outFile) throws IOException{
BufferedReader in = null;
StringBuffer result = new StringBuffer();
try{
in = new BufferedReader(new FileReader(inFile));
String line = null;
while ((in.readLine() != null){
.. do something with the line
result.append(....);
writeToFile(outFile, result.toString());
finally{ closeResource (in); }
public void writeToFile(File outFile, String result) throws IOException{
PrintWriter out = null;
try{
out = new PrintWriter(new FileWriter(outFile, true)); // true for appending to the end of the file
out.println(result);
finally{ if (out != null){ try{ out.close(); } catch (Exception e){} } }
}
Maybe you are looking for
-
Hi all, Apologies if this isnt posted in the correct forum (but I wasnt able to find any mainstream graphic design forums, I know there is ultrashock but that's more flash based, if anyone could point me to some would be great.) Any how my question i
-
ADAPTER_NAME_INVALID error
Hi all, My senario is: IDOC(R3) -> FILE(XI) I get this error "ADAPTER_NAME_INVALID" in the XI monitor screen. <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!-- Call Adapter --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30"
-
How do I perform administrator tasks?
I don't have permission to create directories on some folders, and I don't seem to have admin rights, even though I'm the only owner of the Mac. My "accounts" profile shows me as an admin. How do I become an admin? Scott
-
Tried to upgrade to ios8.1 it shows almost upgraded but stuck for 2hours. It is showing apple simple only. Im not able to either switch off or my home button is also not working.
-
Nuevos datos a comunicar en Certific@2 x ERE's. BOE 4.6.2013
Hola, en el BOE del 4.6.2013 se indica que en la comunicación que se realiza a través de la aplicación certific@2 relacionadas con los ERE's, se deben de incluir nuevos datos, concretamente los indicados en el Articulo 3, tales como si la empresa es