質問編集履歴
4
文面修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
問題点は、下記部分にあると推測し色々調べましたが、どうしても解決することができません。
|
|
74
74
|
```
|
|
75
|
-
connection.storeFile(serverFolder, sendFile, file)
|
|
75
|
+
connection.storeFile(serverFolder, sendFile, file)
|
|
76
76
|
|
|
77
77
|
```
|
|
78
78
|
|
3
改行修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
```ここに言語を入力
|
|
42
42
|
for sendFile in glob.glob("*.xlsx"):
|
|
43
43
|
with open(sendFile, "rb") as file:
|
|
44
|
-
connection.storeFile(serverFolder, sendFile, file)
|
|
44
|
+
connection.storeFile(serverFolder, sendFile, file)
|
|
45
45
|
|
|
46
46
|
smb.smb_structs.OperationFailure: Failed to store test1.xlsx on \●●\●●\●●: Unable to connect to shared device
|
|
47
47
|
```
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
ipAdress = "11.11.200.11" #サーバーIPアドレス
|
|
62
62
|
serverFolder = "\\●●\●●\●●" #サーバーフォルダ
|
|
63
63
|
connection = SMBConnection(user,password,platform.uname().node, "YYY")
|
|
64
|
-
connection.connect(ipAdress, 139)
|
|
64
|
+
connection.connect(ipAdress, 139)
|
|
65
|
+
#サーバーにデータを送信
|
|
65
66
|
|
|
66
67
|
print(connection.echo('echo success'))
|
|
67
68
|
|
2
コードの改行を修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -18,11 +18,13 @@
|
|
|
18
18
|
ipAdress = "192.168.130.100" #サーバーIPアドレス(例)
|
|
19
19
|
serverFolder = "test" #サーバーフォルダ(例)
|
|
20
20
|
connection = SMBConnection(user,password,"myClie nt","HostServer")
|
|
21
|
-
connection.connect(ipAdress, 139)
|
|
21
|
+
connection.connect(ipAdress, 139)
|
|
22
|
+
#サーバーにデータを送信
|
|
22
23
|
os.chdir(sendFileFolder) #送信データフォルダに移動
|
|
23
24
|
for sendFile in glob.glob("*.xlsx"):
|
|
24
25
|
with open(sendFile, "rb") as file:
|
|
25
|
-
connection.storeFile(serverFolder, sendFile, file)
|
|
26
|
+
connection.storeFile(serverFolder, sendFile, file)
|
|
27
|
+
#サーバーのデータを受信
|
|
26
28
|
os.chdir(reciveFileFolder) #受信データフォルダに移動
|
|
27
29
|
for reciveFile in connection.listPath(serverFolder, '/'):
|
|
28
30
|
if reciveFile.filename =="." or reciveFile.filename == "..":
|
1
パスの表記を修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
File without changes
|