एक बैच फ़ाइल में:
START "7-zip" /D "C:\Program Files\7-Zip\" "7z.exe" a -o <F:> testArchive F:\test
या, के रूप में अकेले cmd पर:
7z.exe a -o <C:\users\user\Desktop> testArc C:users\user\desktop\test
रिटर्न "प्रवेश निषेध है"। मैं इसे निर्दिष्ट मापदंडों के साथ 7-ज़िप चलाने की उम्मीद करूंगा। क्यों नहीं करता है?
यहाँ बैच फ़ाइल के लिए कोड है:
@echo off
:Variables
set SOURCE=F:\myDocuments\
set DESTINATION=E:\myDocuments\
:If disc space is available, make tar ball or .7z or whatever of /myDocuments and place it in F:/Backups
START "7-zip" /D "C:\Program Files\7-Zip\" "7z.exe" a -o <F:> testArchive F:\test
pause
:echo %SOURCE%
:echo %DESTINATION%
:pause
:run create sync. on documents to H:/myDocuments
:Otherwise, say there's not enough disc space
ऐसा तब नहीं होता है जब z-zip कमांड के लिए उचित सिंटैक्स का पालन किया जाता है। प्रवेश निषेध है एक 7zip वाक्यविन्यास त्रुटि के कारण था।
@echo off :Variables set SOURCE=F:\myDocuments\ set DESTINATION=E:\myDocuments\ :If disc space is available, make tar ball or .7z or whatever of /myDocuments and place it in F:/Backups START "7-zip" /D "C:\Program Files\7-Zip\" "7z.exe" a -o <F:> testArchive F:\test pause :echo %SOURCE% :echo %DESTINATION% :pause :run create sync. on documents to H:/myDocuments :Otherwise, say there's not enough disc space