批量解压上传SAP Note

这篇具有很好参考价值的文章主要介绍了批量解压上传SAP Note。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

最近在做印度GST相关的东西,需要手动给系统实施上百个SAP Note,十分繁琐。

标准事务代码SNOTE只支持每次上传一个Note,逐个上传大量Note会很麻烦,为此摸索出一个批量解压上传的流程,下面是细节。

本文链接:https://www.cnblogs.com/hhelibeb/p/17548517.html

0,去SAP网站下载Note文件

1,准备好SAR文件,如 '0002407980_00.SAR',把所有SAR文件放到同一个目录下。

2,在相同目录内,放置SAPCAR.EXE解压程序。新建批处理程序xxx.bat,写入以下代码并运行:

@echo off
setlocal

for %%f in (*.SAR) do (
    SAPCAR -xvf "%%f"
)

for %%f in (*.ZIP) do (
    tar -xf "%%f"
)

endlocal

 

这是ChatGPT提供的代码,可以解压当前目录下的SAR文件,具体功能解释如下,

  • @echo off 命令用于关闭命令的回显,使输出更清晰。
  • setlocalendlocal命令用于限制变量的范围,防止它们影响到其他的脚本和环境。
  • for %%f in (*.SAR) do这一行是一个for循环,它会遍历当前目录中所有的.SAR文件。每次迭代中,%%f变量都会包含一个文件名。
  • SAPCAR -xvf "%%f"这一行调用SAPCAR命令,并将当前文件名作为参数。%%f将被替换为实际的文件名。
  • 同理,下一个for遍历目录中所有的.ZIP文件并解压。

(注意,旧版windows可能不支持tar,但这并不要紧,只需要手动全选ZIP文件并解压即可。)

3,步骤2完成后,目录中出现解压得到的TXT文件,可以用于上传。

4,登陆你希望实施Note的SAP系统,运行程序 ZSCWN_NOTES_UPLOAD,选择上文中存放Note的目录,选择全部TXT文件,上传。

如果Note数量多的话,需要耐心等待一段时间,直到程序运行结束。之后,进入事务代码SNOTE,就可以看到批量上传的全部Note已经被加载到SNOTE中。

 

ZSCWN_NOTES_UPLOAD 的作者是Frank Buchholz,原文:Report ZSCWN_NOTES_UPLOAD – Load multiple notes files into SNOTE

为了防止链接失效,在下面贴出代码,

批量解压上传SAP Note批量解压上传SAP Note
  1 *&---------------------------------------------------------------------*
  2 *& Report  ZSCWN_NOTES_UPLOAD
  3 *& Load multiple notes files into SNOTE
  4 *&---------------------------------------------------------------------*
  5 *&
  6 *& Reference:
  7 *& Security Patch Process FAQ
  8 *& http://scn.sap.com/community/security/blog/2012/03/27/security-patch-process-faq#23_What_should_I_do_if_I_cannot_download_a_note_into_SNOTE
  9 *& 23. What should I do if I cannot download a note into SNOTE?
 10 *&
 11 *& Sometimes you run into trouble while downloading large notes in transaction SNOTE, like for the security note 1826162 from July 2013. (In addition this note requires another large note 1674132, too.)
 12 *&
 13 *& In such a case use the download basket to get the note:
 14 *&
 15 *& 1. Show the note on SMP, e.g. https://service.sap.com/sap/support/notes/1826162
 16 *& 2. Use the button "Download Corrections". You get a new window showing a log.
 17 *& 3. Repeat 1. and 2. for more notes, e.g. note 1826162 requires other note 1674132
 18 *& 4. Use the button "Download Basket" on the log window to show your basket
 19 *& 5. Click on every link for the selected notes to download the file via the internet browser (You could try to use the SAP Download Manager, however, this might not work as it uses the same interface like SNOTE.)
 20 *& 6. Un-zip the archive files which you have downloaded
 21 *& 7. In transaction SNOTE use the menu path Goto->Upload note to load the note(s) one by one
 22 *& 8. Implement the note as usual
 23 *&
 24 *& Another advantage is, that you can use the same files for uploading notes into several development systems
 25 *&
 26 *& 19.08.2013 Initial version based on function SCWN_NOTE_UPLOAD_INTERNAL which allows the upload of a single file
 27 *&
 28 *&---------------------------------------------------------------------*
 29 
 30 REPORT  ZSCWN_NOTES_UPLOAD.
 31 
 32 constants: c_program_version(15) type c value '19.08.2013'.
 33 
 34 selection-screen begin of line.
 35 selection-screen comment 1(32) T_PATH for field s_path.
 36 parameters: s_path type string LOWER CASE.
 37 selection-screen end of line.
 38 
 39 SELECTION-SCREEN COMMENT 1(60) ss_vers.
 40 
 41 *----------------------------------------------------------------------*
 42 
 43 INITIALIZATION.
 44 * Authorization check according to report SCWN_ENTRY_TREE (=SNOTE)
 45   CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
 46     EXPORTING
 47       tcode  = 'SNOTE'
 48     EXCEPTIONS
 49       ok     = 0
 50       not_ok = 1
 51       OTHERS = 2.
 52 
 53   IF sy-subrc <> 0.
 54 *     All messages raised from authority_check_tcode means:
 55 *     'This transaction can or should not be started.'
 56     MESSAGE i775(scwn) WITH 'SNOTE'.
 57     LEAVE PROGRAM.
 58   ENDIF.
 59 
 60   T_PATH  = 'Local path with text files'(000).
 61 
 62   concatenate 'Program version from'(000) c_program_version into SS_VERS
 63     SEPARATED BY SPACE.
 64 
 65 * Get default download path
 66   data l_UPLOAD_PATH type string.
 67   CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_UPLOAD_DOWNLOAD_PATH
 68     CHANGING
 69       UPLOAD_PATH                 = l_UPLOAD_PATH
 70       DOWNLOAD_PATH               = s_path
 71     EXCEPTIONS
 72       CNTL_ERROR                  = 1
 73       ERROR_NO_GUI                = 2
 74       NOT_SUPPORTED_BY_GUI        = 3
 75       GUI_UPLOAD_DOWNLOAD_PATH    = 4
 76       UPLOAD_DOWNLOAD_PATH_FAILED = 5
 77       others                      = 6.
 78   IF SY-SUBRC <> 0.
 79 * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
 80 *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
 81   ENDIF.
 82 
 83 *----------------------------------------------------------------------*
 84 
 85 START-OF-SELECTION.
 86 
 87   data: lv_file_filter    TYPE string,
 88         lv_filename       TYPE string,
 89         lv_file_table     TYPE filetable,
 90         lv_rc             TYPE i,
 91         lv_user_action    TYPE i,
 92         lv_file           TYPE LINE OF filetable,
 93         lv_title          TYPE string.
 94   data: lt_cont           LIKE cwbdata OCCURS 0,
 95         lv_FILELENGTH     type i.
 96 
 97 * dialog for file
 98   CLASS cl_gui_frontend_services DEFINITION LOAD.
 99 * Definition of file types see text elements of class CL_GUI_FRONTEND_SERVICES
100   lv_file_filter = cl_gui_frontend_services=>FILETYPE_TEXT.
101   lv_title = 'Upload SAP Note'(100).
102 
103 * Ask for list of files
104   CALL METHOD cl_gui_frontend_services=>file_open_dialog
105     EXPORTING
106       window_title      = lv_title
107       INITIAL_DIRECTORY = s_path
108 *     default_filename  =  lv_filename
109       file_filter       = lv_file_filter
110       multiselection    = 'X'
111     CHANGING
112       file_table        = lv_file_table
113       rc                = lv_rc
114       user_action       = lv_user_action
115     EXCEPTIONS
116       OTHERS            = 1.
117 
118   IF sy-subrc <> 0 OR lv_rc <= 0.
119     EXIT.
120   ENDIF.
121 
122   IF lv_user_action = cl_gui_frontend_services=>action_cancel.
123     MESSAGE s020(scwn).
124     EXIT.
125   ENDIF.
126 
127 * process files
128   data: lv_lines   type i,
129         lv_percent type i,
130         lv_message(132).
131   describe table lv_file_table lines lv_lines.
132   loop at lv_file_table into lv_filename.
133 
134     lv_percent = 100 * sy-tabix / lv_lines.
135     concatenate 'Read file'(002) lv_filename into lv_message SEPARATED BY space.
136     CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
137       EXPORTING
138         PERCENTAGE = lv_percent
139         TEXT       = lv_message.
140 
141 *   Read file
142     CALL FUNCTION 'GUI_UPLOAD'
143       EXPORTING
144         filename                = lv_filename
145         FILETYPE                = 'ASC'
146       IMPORTING
147         FILELENGTH              = lv_FILELENGTH
148       TABLES
149         data_tab                = lt_cont
150       EXCEPTIONS
151         file_open_error         = 1
152         file_read_error         = 2
153         no_batch                = 3
154         gui_refuse_filetransfer = 4
155         invalid_type            = 5
156         no_authority            = 6
157         unknown_error           = 7
158         bad_data_format         = 8
159         header_not_allowed      = 9
160         separator_not_allowed   = 10
161         header_too_long         = 11
162         unknown_dp_error        = 12
163         access_denied           = 13
164         dp_out_of_memory        = 14
165         disk_full               = 15
166         dp_timeout              = 16
167         OTHERS                  = 17.
168 
169     IF sy-subrc <> 0.
170       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
171               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
172     ENDIF.
173 
174 *   Process file
175     perform scwn_note_upload_internal
176       tables lt_cont.
177 
178   endloop.
179 
180   message 'Files loaded'(003) type 'S'.
181 
182 *FUNCTION scwn_note_upload_internal.
183 *"----------------------------------------------------------------------
184 *"*"Lokale Schnittstelle:
185 *"  EXCEPTIONS
186 *"      INCOMPATIBLE_VERSIONS
187 *"      CORRUPT_DATA_FILE
188 *"----------------------------------------------------------------------
189 constants: true type  BCWBN_BOOL value 'X',
190            false type BCWBN_BOOL value space.
191 *
192 FORM scwn_note_upload_internal
193     tables lt_cont. "       LIKE cwbdata OCCURS 0.
194 
195   FIELD-SYMBOLS: <ls_cwbnthead> TYPE cwbnthead.
196 
197   DATA: lv_cancel,
198         lv_filetype   LIKE rlgrap-filetype,
199 *        lt_cont       LIKE cwbdata OCCURS 0,
200         lt_cwbnthead  LIKE cwbnthead OCCURS 0,
201         lt_cwbntstxt  LIKE cwbntstxt OCCURS 0,
202         lt_cwbntdata  TYPE bcwbn_note_text OCCURS 0,
203         lt_cwbntvalid LIKE cwbntvalid OCCURS 0,
204         lt_cwbntci    LIKE cwbntci OCCURS 0,
205         lt_cwbntfixed LIKE cwbntfixed OCCURS 0,
206         lt_cwbntgattr LIKE cwbntgattr OCCURS 0,
207         lt_cwbcihead  LIKE cwbcihead OCCURS 0,
208         lt_cwbcidata  TYPE bcwbn_cinst_delta OCCURS 0,
209         lt_cwbcivalid LIKE cwbcivalid OCCURS 0,
210         lt_cwbciinvld LIKE cwbciinvld OCCURS 0,
211         lt_cwbcifixed LIKE cwbcifixed OCCURS 0,
212         lt_cwbcidpndc LIKE cwbcidpndc OCCURS 0,
213         lt_cwbciobj   LIKE cwbciobj OCCURS 0,
214         lt_cwbcmpnt   LIKE cwbcmpnt OCCURS 0,
215         lt_cwbcmtext  LIKE cwbcmtext OCCURS 0,
216         lt_cwbcmlast  LIKE cwbcmlast OCCURS 0,
217         lt_cwbdehead  LIKE cwbdehead OCCURS 0,
218         lt_cwbdeprdc  LIKE cwbdeprdc OCCURS 0,
219         lt_cwbdetrack LIKE cwbdetrack OCCURS 0,
220         lt_cwbdeequiv LIKE cwbdeequiv OCCURS 0,
221         lt_cwbcidata_ref TYPE cwb_deltas,
222 *        lv_file_filter   TYPE string,
223 *        lv_filename TYPE string,
224 *        lv_file_table TYPE filetable,
225 *        lv_rc TYPE i,
226 *        lv_user_action TYPE i,
227         lv_file TYPE LINE OF filetable,
228 *        lv_title TYPE string,
229         ls_note TYPE bcwbn_note,
230         lt_notes TYPE bcwbn_notes,
231         ls_cwbnthead LIKE cwbnthead.
232 
233   DATA: lv_data_bin        TYPE xstring,
234         lv_code_delta_bin  TYPE xstring,
235         lt_object_data_bin TYPE cwbci_t_objdelta,
236         ls_numm_versno     TYPE cwbntkeyvs.
237 
238 ** dialog for file
239 *  CLASS cl_gui_frontend_services DEFINITION LOAD.
240 *  lv_file_filter = cl_gui_frontend_services=>filetype_all.
241 *  lv_title = text-100.
242 *
243 *  CALL METHOD cl_gui_frontend_services=>file_open_dialog
244 *    EXPORTING
245 *      window_title     = lv_title
246 *      default_filename = lv_filename
247 *      file_filter      = lv_file_filter
248 *    CHANGING
249 *      file_table       = lv_file_table
250 *      rc               = lv_rc
251 *      user_action      = lv_user_action
252 *    EXCEPTIONS
253 *      OTHERS           = 1.
254 *
255 *  IF sy-subrc <> 0 OR lv_rc <= 0.
256 *    EXIT.
257 *  ENDIF.
258 *
259 *  IF lv_user_action = cl_gui_frontend_services=>action_cancel.
260 *    MESSAGE s020(scwn).
261 *    EXIT.
262 *  ENDIF.
263 *
264 ** upload file
265 *  READ TABLE lv_file_table INTO lv_file INDEX 1.
266 *  lv_filename = lv_file-filename.
267 *
268 *  CALL FUNCTION 'GUI_UPLOAD'
269 *    EXPORTING
270 *      filename                = lv_filename
271 *    TABLES
272 *      data_tab                = lt_cont_bin
273 *    EXCEPTIONS
274 *      file_open_error         = 1
275 *      file_read_error         = 2
276 *      no_batch                = 3
277 *      gui_refuse_filetransfer = 4
278 *      invalid_type            = 5
279 *      no_authority            = 6
280 *      unknown_error           = 7
281 *      bad_data_format         = 8
282 *      header_not_allowed      = 9
283 *      separator_not_allowed   = 10
284 *      header_too_long         = 11
285 *      unknown_dp_error        = 12
286 *      access_denied           = 13
287 *      dp_out_of_memory        = 14
288 *      disk_full               = 15
289 *      dp_timeout              = 16
290 *      OTHERS                  = 17.
291 *
292 *  IF sy-subrc <> 0.
293 *    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
294 *            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
295 *  ENDIF.
296 
297   CALL FUNCTION 'SCWN_NOTE_UNPACK'
298     IMPORTING
299       ev_data_bin           = lv_data_bin
300       ev_code_delta_bin     = lv_code_delta_bin
301       et_object_data_bin    = lt_object_data_bin
302     TABLES
303       tt_cont               = lt_cont
304     EXCEPTIONS
305       incompatible_versions = 1
306       corrupt_data_file     = 2
307       OTHERS                = 3.
308 
309   IF sy-subrc <> 0.
310     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
311             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
312   ENDIF.
313 
314   CALL FUNCTION 'SCWN_NOTE_UNPACK_XML'
315     EXPORTING
316       iv_data_bin           = lv_data_bin
317       iv_code_delta_bin     = lv_code_delta_bin
318       it_object_data_bin    = lt_object_data_bin
319     IMPORTING
320       et_cwbnthead          = lt_cwbnthead
321       et_cwbntstxt          = lt_cwbntstxt
322       et_cwbntdata          = lt_cwbntdata
323       et_cwbntvalid         = lt_cwbntvalid
324       et_cwbntci            = lt_cwbntci
325       et_cwbntfixed         = lt_cwbntfixed
326       et_cwbntgattr         = lt_cwbntgattr
327       et_cwbcihead          = lt_cwbcihead
328       et_cwbcidata          = lt_cwbcidata
329       et_cwbcidata_ref      = lt_cwbcidata_ref
330       et_cwbcivalid         = lt_cwbcivalid
331       et_cwbciinvld         = lt_cwbciinvld
332       et_cwbcifixed         = lt_cwbcifixed
333       et_cwbcidpndc         = lt_cwbcidpndc
334       et_cwbciobj           = lt_cwbciobj
335       et_cwbcmpnt           = lt_cwbcmpnt
336       et_cwbcmtext          = lt_cwbcmtext
337       et_cwbcmlast          = lt_cwbcmlast
338       et_cwbdehead          = lt_cwbdehead
339       et_cwbdeprdc          = lt_cwbdeprdc
340       et_cwbdetrack         = lt_cwbdetrack
341       et_cwbdeequiv         = lt_cwbdeequiv
342     EXCEPTIONS
343       corrupt_data_file     = 1
344       incompatible_versions = 2
345       OTHERS                = 3.
346   IF sy-subrc <> 0.
347     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
348             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
349             RAISING corrupt_data_file.
350   ENDIF.
351 
352 * store note
353   CALL FUNCTION 'SCWN_NOTE_STORE'
354     EXPORTING
355       it_cwbcmpnt      = lt_cwbcmpnt
356       it_cwbdetrack    = lt_cwbdetrack
357       it_cwbdehead     = lt_cwbdehead
358       it_cwbdeequiv    = lt_cwbdeequiv
359     TABLES
360       tt_cwbnthead     = lt_cwbnthead
361       tt_cwbntstxt     = lt_cwbntstxt
362       tt_cwbntdata     = lt_cwbntdata
363       tt_cwbntvalid    = lt_cwbntvalid
364       tt_cwbntci       = lt_cwbntci
365       tt_cwbntfixed    = lt_cwbntfixed
366       tt_cwbntgattr    = lt_cwbntgattr
367       tt_cwbcihead     = lt_cwbcihead
368       tt_cwbcidata     = lt_cwbcidata
369       tt_cwbcidata_ref = lt_cwbcidata_ref
370       tt_cwbcivalid    = lt_cwbcivalid
371       tt_cwbciinvld    = lt_cwbciinvld
372       tt_cwbcifixed    = lt_cwbcifixed
373       tt_cwbcidpndc    = lt_cwbcidpndc
374       tt_cwbciobj      = lt_cwbciobj
375     EXCEPTIONS
376       failure          = 1
377       OTHERS           = 2.
378 
379   IF sy-subrc <> 0.
380     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
381             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
382   ELSE.
383 *   store each stored note in download history
384     LOOP AT lt_cwbnthead ASSIGNING <ls_cwbnthead>.
385       ls_numm_versno-numm = <ls_cwbnthead>-numm.
386       ls_numm_versno-versno = <ls_cwbnthead>-versno.
387       CALL FUNCTION 'SCWN_NOTE_DOWNLOAD_HIST'
388         EXPORTING
389           is_note_version = ls_numm_versno
390           iv_mode_write   = true
391         EXCEPTIONS
392           OTHERS          = 1.
393       IF sy-subrc <> 0.
394         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
395                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
396       ENDIF.
397     ENDLOOP.
398   ENDIF.
399 
400 * update software component if necessary
401   CALL FUNCTION 'SCWN_UPDATE_SOFTWARE_COMPONENT'
402     TABLES
403       tt_cwbcmpnt   = lt_cwbcmpnt
404       tt_cwbcmtext  = lt_cwbcmtext
405       tt_cwbcmlast  = lt_cwbcmlast
406       tt_cwbdehead  = lt_cwbdehead
407       tt_cwbdeprdc  = lt_cwbdeprdc
408       tt_cwbdetrack = lt_cwbdetrack
409       tt_cwbdeequiv = lt_cwbdeequiv
410     EXCEPTIONS
411       failure       = 1
412       OTHERS        = 2.
413 
414   IF sy-subrc <> 0.
415     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
416             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
417   ENDIF.
418 
419 * classify notes
420   LOOP AT lt_cwbnthead INTO ls_cwbnthead.
421     ls_note-key-numm = ls_cwbnthead-numm.
422     ls_note-key-versno = ls_cwbnthead-versno.
423     APPEND ls_note TO lt_notes.
424   ENDLOOP.
425 
426   CALL FUNCTION 'SCWB_NOTES_CLASSIFY'
427     EXPORTING
428       it_notes        = lt_notes
429       iv_set_ntstatus = ' '.
430 
431 ENDFORM.
432 *ENDFUNCTION.
ZSCWN_NOTES_UPLOAD

 文章来源地址https://www.toymoban.com/news/detail-550674.html

到了这里,关于批量解压上传SAP Note的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • [python]批量解压文件夹下所有压缩包(rar、zip、7z)

            在文件夹作用包含许多压缩包的时候,解压起来就很费时费力,尤其是在文件夹还存在嵌套的情况下,解压起来就更麻烦了。Franpper今天给大家带来递归遍历指定路径下的所有文件和文件夹,批量解压所有压缩包的方法,帮大家一键解压。         常见的压缩包格

    2024年02月09日
    浏览(63)
  • 最近读的AIGC相关论文思路解读

    提示:本博客是作者本人最近对AIGC领域相关论文调研后,临时记录所用,所有观点都是来自作者本人局限理解,以及个人思考,不代表对。如果你也正好看过相关文章,发现作者的想法和思路有问题,欢迎评论区留言指正! 既然是论文阅读分享,首先,你需要有一些AIGC基础

    2024年02月10日
    浏览(34)
  • (总目录)springboot - 实现zip文件上传并对zip文件解压, 包含上传oss

    本文会包含 java 文件校验 文件上传 文件压缩 zip文件的解压 oss的文件上传 oss前端上传 文章像齿轮一样, 部分位置需要自己组装满足不同业务需求 需要哪个就加哪个 注意类型和位置即可 注释都是很全的 如果在使用中 遇到问题 欢迎评论区指正 === 传送门: MultipartFile 统一文件

    2024年02月07日
    浏览(56)
  • Linux中文件的上传、下载、压缩、解压等命令和操作

    简单使用:当使用工具连接的Linux时,可以直接将文件进行鼠标拖拽进行文件操作 • Linux和Mac系统常用有2种压缩格式,后缀名分别是: ○ .tar,称之为tarball,归档文件,即简单的将文件组装到一个.tar的文件内,并没有太多文件体积的减少,仅仅是简单的封装 ○ .gz,也常见

    2024年02月15日
    浏览(52)
  • 微信小程序文件相关操作(新建文件夹、下载、解压、读取等)

    wx.downloadFile()  //下载 wx.getFileSystemManager()  //获取小程序的文件管理器 FileSystemManager.unzip() //解压 FileSystemManager.readdir()  //读取文件夹 FileSystemManager.readFile()  //读取文件 FileSystemManager.access() //判断文件/目录是否存在 FileSystemManager.mkdir()  //创建文件夹 index.js 在 onload 中获取 F

    2024年02月15日
    浏览(50)
  • zip压缩包上传到了服务器怎么解压——提示unzip:command not found

    xshell进入压缩包所在的文件夹 如果你已经将zip压缩包上传到了服务器,可以使用以下命令解压缩: 其中,file.zip为你上传的zip压缩包的文件名。执行该命令后,zip压缩包中的所有文件将被解压到当前目录中。 如果你希望将解压后的文件解压到指定目录中,可以使用以下命令

    2023年04月09日
    浏览(48)
  • SAP EXCEL上传行数限制问题(ALSM_EXCEL_TO_INTERNAL_TABLE)

    标准函数ALSM_EXCEL_TO_INTERNAL_TABLE上传EXCEL函数限制上限是9999行,如果上传数据记录数超过9999行的情况,需要拷贝标准的函数封装一个自定义的函数进行处理 标准的函数ROW的长度为4位,如下图所示 因此,如果想行数的位数超过4位的话,需要自定义一个数据结构,将ROW的长度定

    2024年01月25日
    浏览(41)
  • 文件上传(模板导出、批量导入)

    html部分 b class=\\\"addBtn UseraddBtn\\\" style=\\\"background: #3d7bde;right: 93px;\\\"+ 批量导入/b           input type=\\\"file\\\" id=\\\"fileInput\\\"             style=\\\"opacity: 0;right: 93px;width: 88px;height:29px;position: absolute;top:-5px\\\" οnchange=\\\"BatchImport()\\\"           a href=\\\"./模板.xlsx\\\" class=\\\"addBtn UseraddBtn\\\" target=\\\"_blank\\\"        

    2023年04月08日
    浏览(41)
  • Java实现批量上传

    要使用Java实现批量上传,你可以按照以下步骤进行: 在Java中使用一个HTTP客户端库,比如Apache HttpClient或OkHttp来发送HTTP请求。 创建一个HTTP POST请求,并将文件作为请求的一部分发送到服务器。可以使用Java的File类来读取文件,并将文件内容作为请求的一部分进行发送。 如果

    2024年02月13日
    浏览(43)
  • SpringBoot上传文件到Minio服务器,支持批量上传

    本文主要介绍如何使用SpringBoot上传到minio服务器。 没什么可多说的,公司用什么咱们开发研究什么就完事了。直接分享核心代码。 minio依赖 配置文件 首先是核心的参数,包括服务器minio地址,以及用户名密码,使用的桶名称 controller代码 如果只需要上传文件,只需要Multipa

    2024年02月08日
    浏览(51)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包